Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integration test #770

Merged
merged 25 commits into from
Jan 10, 2023

Conversation

killme2008
Copy link
Contributor

@killme2008 killme2008 commented Dec 20, 2022

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Main changes:

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@killme2008 killme2008 added the WIP label Dec 20, 2022
@waynexia waynexia self-requested a review December 21, 2022 02:28
@killme2008 killme2008 force-pushed the feature/integration-test branch 2 times, most recently from 7f15bac to 7cacd34 Compare December 27, 2022 06:50
@killme2008 killme2008 marked this pull request as ready for review December 27, 2022 06:59
@killme2008
Copy link
Contributor Author

After merging the Arrow flight service, looks like all tests fail:

Failed to execute, error: TonicStatus { addr: "127.0.0.1:4001", source: Status { code: Internal, message: "Failed to execute query: SelectExpr { expr: Some(Sql(\" DROP TABLE test;\")) }, source: Failed to do Flight get, source: status: Internal, message: \"Invalid SQL, error: expect SQL to be selection, actual:  DROP TABLE test;\", details: [], metadata: MetadataMap { headers: {} }", metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Tue, 27 Dec 2022 06:52:27 GMT", "content-length": "0"} }, source: None }, backtrace: Backtrace(   0: backtrace::backtrace::libunwind::trace
<              at /Users/dennis/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.67/src/backtrace/libunwind.rs:93:5
<       backtrace::backtrace::trace_unsynchronized
<              at /Users/dennis/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.67/src/backtrace/mod.rs:66:5
<    1: backtrace::backtrace::trace
<              at /Users/dennis/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.67/src/backtrace/mod.rs:53:14
<    2: backtrace::capture::Backtrace::create
<              at /Users/dennis/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.67/src/capture.rs:176:9
<    3: backtrace::capture::Backtrace::new
<              at /Users/dennis/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.67/src/capture.rs:140:22
<    4: <snafu::backtrace_shim::Backtrace as snafu::GenerateImplicitData>::generate
<              at /Users/dennis/.cargo/registry/src/github.com-1ecc6299db9ec823/snafu-0.7.4/src/backtrace_shim.rs:15:19
<       snafu::GenerateImplicitData::generate_with_source
<              at /Users/dennis/.cargo/registry/src/github.com-1ecc6299db9ec823/snafu-0.7.4/src/lib.rs:1152:9
<    5: <client::error::TonicStatusSnafu<__T0> as snafu::IntoError<client::error::Error>>::into_error
<              at src/client/src/error.rs:20:17
<    6: <core::result::Result<T,E> as snafu::ResultExt<T,E>>::context
<              at /Users/dennis/.cargo/registry/src/github.com-1ecc6299db9ec823/snafu-0.7.4/src/lib.rs:697:31
<    7: client::client::Client::batch::{{closure}}
<              at src/client/src/client.rs:143:22
<    8: client::client::Client::database::{{closure}}
<              at src/client/src/client.rs:127:38
<    9: client::database::Database::objects::{{closure}}
<              at src/client/src/database.rs:126:44

@killme2008 killme2008 removed the WIP label Dec 27, 2022
@codecov
Copy link

codecov bot commented Dec 27, 2022

Codecov Report

Merging #770 (14615b2) into develop (32d5194) will decrease coverage by 0.16%.
The diff coverage is 82.35%.

@@             Coverage Diff             @@
##           develop     #770      +/-   ##
===========================================
- Coverage    86.10%   85.93%   -0.17%     
===========================================
  Files          421      421              
  Lines        55460    55549      +89     
===========================================
- Hits         47752    47735      -17     
- Misses        7708     7814     +106     
Flag Coverage Δ
rust 85.93% <82.35%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/datanode/src/error.rs 67.39% <ø> (ø)
src/datanode/src/instance.rs 50.00% <0.00%> (-20.26%) ⬇️
src/sql/src/statements/create.rs 100.00% <ø> (ø)
src/table/src/requests.rs 55.55% <ø> (ø)
src/datanode/src/sql/create.rs 89.07% <83.33%> (-0.24%) ⬇️
src/sql/src/parsers/create_parser.rs 97.08% <93.33%> (-0.23%) ⬇️
src/sql/src/statements.rs 89.58% <96.15%> (+0.33%) ⬆️
src/datanode/src/instance/grpc.rs 97.76% <100.00%> (+0.01%) ⬆️
src/datanode/src/instance/sql.rs 80.43% <100.00%> (+0.08%) ⬆️
src/frontend/src/instance/distributed.rs 92.15% <100.00%> (+0.01%) ⬆️
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I can't find a common characteristic from queries in optimizer/filter_push_down.sql. From the naming I would expect something like EXPLAIN rather than execute those SQLs.

.gitignore Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
tests/cases/standalone/aggregate/distinct_order_by.sql Outdated Show resolved Hide resolved
tests/cases/standalone/aggregate/sum.result Show resolved Hide resolved
tests/cases/standalone/aggregate/sum.result Show resolved Hide resolved
tests/cases/standalone/insert/insert.sql Outdated Show resolved Hide resolved
tests/runner/src/main.rs Show resolved Hide resolved
tests/cases/standalone/order/limit.sql Outdated Show resolved Hide resolved
@killme2008
Copy link
Contributor Author

And I can't find a common characteristic from queries in optimizer/filter_push_down.sql. From the naming I would expect something like EXPLAIN rather than execute those SQLs.

It's moved from duckdb, and EXPLAIN will be test in optimizer cases.

@waynexia
Copy link
Member

waynexia commented Jan 4, 2023

and EXPLAIN will be test in optimizer cases.

Do you mean they will be added in the future? Maybe we can change it now, those queries have fewer means by executing themselves, and is not what the case name filter_push_down means.

@killme2008
Copy link
Contributor Author

and EXPLAIN will be test in optimizer cases.

Do you mean they will be added in the future? Maybe we can change it now, those queries have fewer means by executing themselves, and is not what the case name filter_push_down means.

Sorry, my mistake. I meant that the duckdb has a test suite for EXPLAIN command https://github.com/duckdb/duckdb/tree/master/test/sql/explain

We'll move them later.

@waynexia waynexia merged commit 9428e70 into GreptimeTeam:develop Jan 10, 2023
@killme2008 killme2008 deleted the feature/integration-test branch January 10, 2023 10:51
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: add insert test cases

* fix: update results after rebase develop

* feat: supports unsigned integer types and big_insert test

* test: add insert_invalid test

* feat: supports time index constraint for bigint type

* chore: time index column at last

* test: adds more order, limit test

* fix: style

* feat: adds numbers table in standable memory catalog mode

* feat: enable fail_fast and test_filter in sqlness

* feat: add more tests

* fix: test_filter

* test: add alter tests

* feat: supports if_not_exists when create database

* test: filter_push_down and catalog test

* fix: compile error

* fix: delete output file

* chore: ignore integration test output in git

* test: update all integration test results

* fix: by code review

* chore: revert .gitignore

* feat: sort the show tables/databases results

* chore: remove issue link

* fix: compile error and code format after rebase

* test: update all integration test results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants