Ruihang Xia
9e21632f23
fix: clippy warning ( #1669 )
...
* fix: clippy warning
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* restore the removed common sqlness cases
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-05-30 08:55:24 +08:00
Ruihang Xia
b27c569ae0
refactor: add scan_to_stream() to Table trait to postpone the stream generation ( #1639 )
...
* add scan_to_stream to Table
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* impl parquet stream
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* reorganise adapters
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* implement scan_to_stream for mito table
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* clean up
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add location info
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix: table scan
* UT pass
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* impl project record batch
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix information schema
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* resolve CR comments
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove one todo
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix errors generated by merge commit
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add output_ordering method to record batch stream
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix rustfmt
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* enhance error types
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Lei, HUANG <mrsatangel@gmail.com >
2023-05-29 20:03:47 +08:00
Ruihang Xia
0da94930d5
feat: impl literal only PromQL query ( #1641 )
...
* refactor EmptyMetric to accept expr
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* impl literal only query
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add empty line
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* clean up
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* support literal on HTTP gateway
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy (again)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-05-26 23:27:03 +08:00
Vanish
8764ce7845
feat: add delete WAL in drop_region ( #1577 )
...
* feat: add delete WAL in drop_region
* chore: fix typo err.
* feat: mark all SSTs deleted and remove the region from StorageEngine's region map.
* test: add test_drop_region for StorageEngine.
* chore: make clippy happy
* fix: fix conflict
* chore: CR.
* chore: CR
* chore: fix clippy
* fix: temp file life time
2023-05-18 18:02:34 +08:00
Eugene Tolbakov
122bd5f0ab
feat(tql): add initial implementation for explain & analyze ( #1427 )
...
* feat(tql): resolve conflicts after merge,formatting and clippy issues, add sqlness tests, adjust explain with start, end, step
* feat(tql): adjust sqlness assertions
2023-05-16 07:28:24 +08:00
Ning Sun
d679cfcb53
feat: add semantic_type to information_schema.columns ( #1530 )
2023-05-06 15:48:37 +08:00
Niwaka
d86b3386dc
fix: incorrect show create table output ( #1514 )
...
* fix: incorrect show create table output
* feat: change CreateTable's Display if table is external
* feat: change CreateTable's Display if table is external
2023-05-05 11:29:09 +08:00
Weny Xu
c471007edd
feat: support to copy table from/to CSV and JSON format file ( #1475 )
...
* refactor: refactor copy from executor
* feat: support to copy from CSV and JSON format files
* feat: support to copy table to the CSV and JSON format file
* test: add tests copy from/to
* chore: apply suggestions from CR
2023-05-04 17:20:28 +08:00
Ning Sun
6e1bb9e458
feat: add support for information_schema.columns ( #1500 )
...
* feat: add support for information_schema.columns
* feat: remove information_schema from its view
* Update src/catalog/src/information_schema.rs
Co-authored-by: LFC <bayinamine@gmail.com >
* fix: error on table data type
* test: correct sqlness test for information schema
* test: add information_schema.columns sqlness tests
---------
Co-authored-by: LFC <bayinamine@gmail.com >
2023-05-04 14:29:38 +08:00
Niwaka
d461328238
fix: insert distributed table if partition column has default value ( #1498 )
...
* fix: insert distributed table if partition column has default value
* Address review
* address review
* address review
* chore: introduce assert_columns
---------
Co-authored-by: WenyXu <wenymedia@gmail.com >
2023-05-02 20:50:02 +08:00
Ruihang Xia
939a51aea9
feat: adopt REPLACE interceptor and quit all processes on exit ( #1478 )
...
* bump version and update test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* quit all processes on drop
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Update tests/runner/src/env.rs
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
2023-04-27 07:16:41 +00:00
Lei, HUANG
fb9978e95d
refactor: catalog ( #1454 )
...
* wip
* add schema_async
* remove CatalogList
* remove catalog provider and schema provider
* fix
* fix: rename table
* fix: sqlness
* fix: ignore tonic error metadata
* fix: table engine name
* feat: rename catalog_async to catalog
* respect engine name in table regional value when deregistering tables
* fix: CR
2023-04-26 08:36:40 +00:00
Yingwen
eb50cee601
feat: Switch to the procedure framework ( #1448 )
...
* feat: Remove create_mock_sql_handler()
create_to_request() and alter_to_request() don't need `&self`, so
we don't need to mock the sql handler to test them
* feat: Enable procedure manager by default
* docs: Update config example
* test: Enable procedure framework in all tests
* refactor(datanode): rename methods using procedure
* test(catalog): Fix temp dir drops before test finishes
* tests: Enable procedure framework in sqlness
* test: Fix sqlness standalone rename test
* fix: Drop procedure allows table not in engine
* test: Change rename table test
* fix: add options to table meta when creating table by procedure
* test: adjust error message in schema test case
* test: Fix test_sql_api error message
2023-04-25 12:04:02 +08:00
Ruihang Xia
b9db2cfd83
fix: support restart sqlness in distributed mode ( #1443 )
...
* fix: support restart sqlness in distributed mode
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* move alter_table case to common dir
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* is_standalone flag
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Update tests/runner/src/env.rs
Co-authored-by: LFC <bayinamine@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: LFC <bayinamine@gmail.com >
2023-04-24 19:36:12 +08:00
LFC
17daf4cdff
feat: support "delete" in distributed mode ( #1441 )
...
* feat: support "delete" in distributed mode
* fix: resolve PR comments
2023-04-24 12:07:50 +08:00
Ruihang Xia
5d77ed00bb
test: add basic cases for distributed TQL ( #1437 )
...
* test: add basic cases for distributed TQL
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* drop table
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-04-23 03:34:42 +00:00
Zheming Li
c75845c570
fix: wrong next column in manifest ( #1440 )
...
Signed-off-by: Zheming Li <nkdudu@126.com >
2023-04-23 11:25:38 +08:00
dennis zhuang
2a9f482bc7
feat: show create table ( #1336 )
...
* temp commit
* feat: impl Display for CreateTable statement
* feat: impl show create table for standalone
* fix: forgot show.rs
* feat: clean code
* fix: typo
* feat: impl show create table for distributed
* test: add show create table sqlness test
* fix: typo
* fix: sqlness tests
* feat: render partition rules for distributed table
* Update src/sql/src/statements.rs
Co-authored-by: Yingwen <realevenyag@gmail.com >
* Update src/sql/src/statements.rs
Co-authored-by: Yingwen <realevenyag@gmail.com >
* Update src/sql/src/statements.rs
Co-authored-by: Yingwen <realevenyag@gmail.com >
* Update src/sql/src/statements/create.rs
Co-authored-by: Yingwen <realevenyag@gmail.com >
* chore: by CR comments
* fix: compile error
* fix: missing column comments and extra table options
* test: add show create table test
* test: add show create table test
* chore: timestamp precision
* fix: test
---------
Co-authored-by: Yingwen <realevenyag@gmail.com >
2023-04-21 11:37:16 +08:00
Ruihang Xia
7152a1b79e
feat: expose output_ordering on scan plan ( #1425 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-04-20 17:58:48 +08:00
Hao
e4cd08c750
feat: add table id and engine to information_schema.TABLES ( #1407 )
...
* feat: add table id and engine to informatin_schema.TABLES
* Update src/catalog/src/information_schema/tables.rs
Co-authored-by: Yingwen <realevenyag@gmail.com >
* chore: change table_engine to engine
* test: update sqlness for information schema
* test: update information_schema test in frontend::tests::instance_test.rs
* fix: github action sqlness information_schema test fail
* test: ignore table_id in information_schema
* test: support distribute and standalone have different output
---------
Co-authored-by: Yingwen <realevenyag@gmail.com >
2023-04-19 10:52:02 +08:00
LFC
ff2784da0f
test: add SELECT ... LIMIT ... test cases for distributed mode ( #1419 )
2023-04-18 23:05:43 +08:00
Ruihang Xia
f4190cfca6
fix: table scan without projection ( #1404 )
...
* fix: table scan without projection
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update PR reference
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-04-17 20:10:36 +08:00
Ruihang Xia
dc85a4b5bb
feat: migrate substrait to datafusion official implementation ( #1238 )
...
* some test cases will fail
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* revert version changes
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update substrait-proto version
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix compile
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update df again
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* clean up
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Update src/common/substrait/Cargo.toml
Co-authored-by: dennis zhuang <killme2008@gmail.com >
* revert COPY FROM / COPY TO sqlness to standalone only
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: dennis zhuang <killme2008@gmail.com >
2023-04-17 15:54:35 +08:00
LFC
f7b7a9c801
feat: implement COPY for cluster ( #1388 )
2023-04-17 11:04:47 +08:00
Ruihang Xia
a6e41cdd7b
chore: bump arrow, parquet, datafusion and tonic ( #1386 )
...
* bump arrow, parquet, datafusion, tonic and greptime-proto
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add analyzer and fix test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy warnings
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update sqlness result
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-04-15 00:03:15 +08:00
LFC
0fc816fb0c
test: add "numbers" table in distributed mode ( #1374 )
2023-04-14 11:52:04 +08:00
LFC
a3e47955b8
feat: information schema ( #1327 )
...
* feat: basic information schema
* show information schema only for current catalog
* fix: fragile tests
2023-04-07 16:50:14 +08:00
LFC
f8b6a6b219
fix!: not allowed to create column name same with keyword without quoted ( #1333 )
...
* fix: not allowed to create column name same with keyword without quoted
* fix: tests
* Update src/sql/src/parsers/create_parser.rs
Co-authored-by: Ning Sun <classicning@gmail.com >
* fix: tests
---------
Co-authored-by: Ning Sun <classicning@gmail.com >
2023-04-06 15:34:26 +08:00
Lei, HUANG
d10de46e03
feat: support timestamp precision on creating table ( #1332 )
...
* feat: support timestamp precision on creating table
* fix sqlness
* fix: substrait representation of different timestamp precision
2023-04-06 11:18:20 +08:00
Ruihang Xia
10593a5adb
fix: update sqlness result ( #1328 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-04-04 22:47:55 +08:00
Ruihang Xia
99353c6ce7
refactor: rename "value" semantic type to "field" ( #1326 )
...
* global replace
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* change desc table
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update sqlness result
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-04-04 11:14:28 +00:00
LFC
48c2841e4d
feat: execute python script in distributed mode ( #1264 )
...
* feat: execute python script in distributed mode
* fix: rebase develop
2023-04-02 20:36:48 +08:00
Lei, HUANG
0253136333
feat: buffered parquet writer ( #1263 )
...
* wip: use
* rebase develop
* chore: fix typos
* feat: replace export parquet writer with buffered writer
* fix: some cr comments
* feat: add sst_write_buffer_size config item to config how many bytes to buffer before flush to underlying storage
* chore: reabse onto develop
2023-04-01 17:21:19 +08:00
Ruihang Xia
b71bb4e5fa
feat: implement restart argument for sqlness-runner ( #1262 )
...
* refactor standalone mode and distribute mode start process
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* implement restart arg
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Update tests/runner/src/env.rs
Co-authored-by: LFC <bayinamine@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: LFC <bayinamine@gmail.com >
2023-03-31 10:02:19 +08:00
LFC
fae293310c
feat: unify describe table execution ( #1285 )
2023-03-31 09:59:19 +08:00
Ruihang Xia
b5e5f8e555
chore(deps): bump arrow and parquet to 36.0.0, and datafusion to the latest ( #1282 )
...
* chore: update arrow, parquet to 36.0 and datafusion
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update deps
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Apply suggestions from code review
Co-authored-by: LFC <bayinamine@gmail.com >
* update sqlness result
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: LFC <bayinamine@gmail.com >
2023-03-30 16:24:10 +08:00
LFC
92963b9614
feat: execute "delete" in query engine (in the form of "LogicalPlan") ( #1222 )
...
fix: execute "delete" in query engine (in the form of "LogicalPlan")
2023-03-24 12:11:58 +08:00
LFC
b77b561bc8
refactor: execute insert with select in query engine ( #1181 )
...
* refactor: execute insert with select in query engine
* fix: resolve PR comments
2023-03-23 10:38:26 +08:00
Eugene Tolbakov
5397a9bbe6
feat(to_unixtime): add initial implementation ( #1186 )
...
* feat(to_unixtime): add initial implementation
* feat(to_unixtime): use Timestamp for conversion
* feat(to_unixtime): implement conversion to Result<VectorRef>
* feat(to_unixtime): make unit test pass
* feat(to_unixtime): preserve None for invalid timestamps
* feat(to_unixtime): address code review suggestions
* feat(to_unixtime): add an sqlness test
* feat(to_unixtime): adjust the assertion for the sqlness test
* Update tests/cases/standalone/common/select/dummy.sql
---------
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
2023-03-21 12:41:07 +00:00
Weny Xu
b8f7f603cf
test: add copy clause sqlness tests ( #1198 )
2023-03-21 11:22:26 +08:00
Ruihang Xia
e8d2e82335
fix: ambiguous column reference ( #1177 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-03-14 13:18:43 +00:00
LFC
8d3999df5f
fix: failed to run subquery wrapped in two parentheses ( #1157 )
2023-03-14 10:59:43 +08:00
LFC
11d45e2918
refactor: upgrade DataFusion, Arrow and Sqlparser ( #1074 )
...
* refactor: upgrade DataFusion, Arrow and Sqlparser
* fix: resolve PR comments
2023-02-27 22:20:08 +08:00
LFC
5533040be7
fix: describe distribute table ( #988 )
...
* fix: describe distribute table
2023-02-15 17:48:43 +08:00
LFC
34fdba77df
feat: create database if not exists ( #1009 )
2023-02-15 17:47:46 +08:00
Xieqijun
de0b8aa0a0
feat: Support the DELETE SQL statement ( #942 )
...
* [WIP]:delete sql
* [fix]:time parser bug
* [fix]:resolve conflict
* [fmt]:cargo fmt
* [fix]:remove unless log
* [fix]:test
* [feat]:add error parse
* [fix]:resolve conflict
* [fix]:remove unless code
* [fix]:remove unless code
* [test]:add IT
* [fix]:add license
* [fix]:ci
* [fix]:ci
* [fix]:ci
* [fix]:remove
* [fix]:ci
* [feat]:add sql
* [fix]:modify sql
* [feat]:refactor parser_expr
* [feat]:rm backtrace
* [fix]:ci
* [fix]: conversation
* [fix]: conversation
* feat:refactor delete
* feat:refactor delete
* fix:resolve conversation
* fix:ut
* fix:ut
* fix:conversation
* fix:conversation
* fix:conservation
---------
Co-authored-by: xieqijun <qijun@apache.org >
2023-02-15 13:13:17 +08:00
LFC
9ad6c45913
test: Sqlness tests for distribute mode ( #979 )
...
* test: Sqlness tests for distribute mode
* ci
* fix: resolve PR comments
* fix: resolve PR comments
2023-02-14 10:24:09 +08:00
Yun Chen
c0d3533d10
fix: Sql Inline Primary Key definition ( #957 )
...
* fix: invalid inline primary key syntax
* fix: format
* fix: clippy fix
* fix: added sqlness tests
* fix: throw exception when multiple inline pk defined
* fix: pr comments
* fix: add ending blank line for create.sql
2023-02-09 18:57:19 +08:00
LFC
184ca78a4d
revert: removed all "USE"s in sqlness tests introduced in #922 ( #938 )
2023-02-03 15:44:58 +08:00
LFC
af935671b2
feat: support "use" in GRPC requests ( #922 )
...
* feat: support "use catalog and schema"(behave like the "use" in MySQL) in GRPC requests
* fix: rebase develop
2023-02-02 20:02:56 +08:00