Commit Graph

388 Commits

Author SHA1 Message Date
wangmm0220 fc9dfc77d0 fix:add plan for multi agg operator in stream 2023-12-05 20:07:20 +08:00
dapan1121 abdf6d337a enh: push down conditions 2023-11-29 20:06:30 +08:00
dapan1121 84cc80be1c fix: add window_offset translate 2023-11-28 14:35:11 +08:00
dapan1121 19752b020f feat: support more join type 2023-11-27 20:01:00 +08:00
slzhou c53bd04894 feat: after select compacts 2023-11-23 15:26:21 +08:00
slzhou 9ad86d7753 commit: add create show stmt support 2023-11-16 11:41:02 +08:00
dapan1121 350fac01a0 Merge remote-tracking branch 'origin/3.0' into feat/TD-24802 2023-11-10 11:48:55 +08:00
wangjiaming0909 a6600ab23a correct colid in blockinfo 2023-11-09 15:41:01 +08:00
dapan1121 c2ec373557 Merge remote-tracking branch 'origin/3.0' into feat/TD-24802 2023-11-07 10:09:10 +08:00
dapan1121 0ed4d1507f feat: support non_sort mode 2023-11-07 09:23:06 +08:00
dapan1121 478de7ae56 feat: add show create view implement 2023-10-11 10:38:22 +08:00
dapan1121 b9d554275c Merge remote-tracking branch 'origin/3.0' into feat/TD-25204 2023-09-19 14:21:00 +08:00
dapan1121 14e8db289d feat: support view 2023-09-19 14:19:54 +08:00
wangjiaming0909 cb78c54d72 optimize sort perf 2023-09-13 18:37:42 +08:00
wangjiaming0909 4a131000e4 fix: data error of partition by col + interval 2023-09-07 10:49:09 +08:00
wangjiaming0909 2c4e0fee07 feat: optimize partition node, replace with sort node 2023-09-05 10:53:30 +08:00
dapan1121 e8fa9aa633 fix: join blockId and target issues 2023-08-17 13:50:26 +08:00
dapan1121 143c657571 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-08-16 14:50:31 +08:00
dapan1121 a6ecb7253e
Merge pull request #22390 from taosdata/feat/3.0/TD-25365
feat: optimize select agg_func partition by tag slimit
2023-08-16 13:32:58 +08:00
wangjiaming0909 e587cc50e6 feat: optimize select agg_func partition by tag slimit 2023-08-16 11:20:56 +08:00
slzhou 4fdaaba3ce Merge branch '3.0' of github.com:taosdata/TDengine into szhou/tag-scan-opt 2023-08-15 17:18:25 +08:00
slzhou 450d7e2d3c enhance: compilation error 2023-08-15 16:56:15 +08:00
shenglian zhou 84e472ad03 enhance: tag cond col list only once and tag scan derive from scan 2023-08-15 16:10:54 +08:00
dapan1121 8fc0f1bbd6 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-08-15 09:00:53 +08:00
slzhou 012248b681 fix: move the only ctb idx flag to logical plan 2023-08-14 19:26:53 +08:00
slzhou 6688d70ba4 fix: fix planner test error 2023-08-13 18:46:55 +08:00
dapan1121 8987553d9c fix: remove ins_modules 2023-08-11 15:56:38 +08:00
shenglian zhou 1c7f854a71 enhance: add only meta ctb index to tag scan physi node 2023-08-11 14:47:28 +08:00
dapan1121 1aac643a9b enh: support single vnode join 2023-08-09 10:30:35 +08:00
dapan1121 e83a46b88f enh: cache necessary file for seq mode 2023-07-26 19:17:59 +08:00
dapan1121 4f75eb5655 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-07-24 11:43:15 +08:00
wangjiaming0909 7d850c1a5e feat: optimize partition by tbname slimit 2023-07-20 15:07:55 +08:00
dapan1121 c45359c989 enh: add batch table scan 2023-07-19 10:37:30 +08:00
dapan1121 a1e18ac898 fix: fix global cache issue 2023-07-17 09:25:28 +08:00
dapan1121 188df1d675 fix: fix bugs 2023-07-14 19:36:56 +08:00
dapan1121 2312f10372 enh: support concurrent fetch from group cache 2023-07-14 13:30:13 +08:00
dapan1121 a42bd9e478 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-07-11 19:34:39 +08:00
wangjiaming0909 1d7515213b feat: 1. add limit for diskBasedBuf
2. use referenced tuple before actually pushing into pq
3. use limitInfo instead of maxRows in sort pyhsical node
2023-07-11 14:16:20 +08:00
dapan1121 779224f0a6 fix: fix bugs 2023-07-06 19:33:31 +08:00
dapan1121 60290b98e4 feat: add group cache operator 2023-06-30 19:20:36 +08:00
dapan1121 226ee06209 enh: add physical plan processing 2023-06-29 19:28:32 +08:00
dapan1121 9f0da17c49 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-06-28 19:40:55 +08:00
dapan1121 81a2bf10cf enh: optimize stable join 2023-06-28 19:39:04 +08:00
dapan1121 8f39b9d2e4 enh: optimize query plan 2023-06-27 19:36:51 +08:00
wangjiaming0909 57ddb3437d feature: optimize order by limit using priority queue 2023-06-27 17:50:50 +08:00
dapan1121 ce2635074d enh: add uid/vgid functions 2023-06-26 11:48:47 +08:00
wangjiaming0909 fb4f174fbc feature: add input, output ts order for execution plans 2023-06-16 10:26:09 +08:00
Haojun Liao 5301c5756a other: merge main into 3.0. 2023-06-01 09:29:18 +08:00
Dingle Zhang 984211f3b4
Feature/3.0 geometry (#21037)
* Add GEOMETRY data type and make sql.c able to parse it. The GEMETRY works like BINARY so far.

* add GEOMETRY type into gConvertTypes to fix some issues like DELETE calling

* change some test cases to make sure no same timestamp is inserted, and add my smoketest.sh

* Add a function MakePoint() and introduce a lib geometry

* implement sql functions GeomFromText() and AsText()

* Use GEOS *_r funcions instead for thread safety

* Handle with TSDB_DATA_TYPE_GEOMETRY when INSERT geometry data by converting WKT.
Add geosWrapper to wrap the basic GEOS functions for TDEngine.

* refactor AsText and MakePoint functions to be like GeomFromText

* Show WKT when print geometry data in screen
Dump hex data when dump geometry data in a file

* define TYPE_BYTES item for TSDB_DATA_TYPE_GEOMETRY, which casued some strange issues.

* set number of decimals of WKT to 6

* Implement SQL function Intersects()

* refactor geometry sql functions

* Add geosErrMsgeHandler() to get the GEOS error detail

* use threadlocal to instantiate SGeosContext
call destroyGeosContext() only if the thread exists

* remove SGeosContext *context param for all geometry functions since we use thread local one,
so that all caller do not need to know the context.

* Modify Intersects() to call PreparedIntersects() when one of param is a constant, which has higher performance.

* rename prepareFn() to initCtxFn() to avoid confusion with PreparedFn

* Add prefix "ST_" for all geometry functions

* move getThreadLocalGeosCtx() and destroyThreadLocalGeosCtx() into util,
so that all unit test tools can compile

* Add unit test for geometry lib, only test MakePoint so far

* refactor and enhance existing cases in geomFuncTest

* implement NULL type and NULL value test for geomFuncTest

* add test on geomFromText()

* add unit test on AsText() in geomFuncTest

* combine some makePointFunction test items

* add intersectsFunctionTwoColumns test
refactor on callGeomFromTextWrapper functions

* enhance intersectsFunction test to add cases like input constant , NULL type, NULL value, or wrong content

* add more cases into intersectsFunction test

* Add basic test on geometry in system test

* Add ST_GeomFromText and ST_AsText function test in system test on geometry

* add ST_Intersects function test in system test on geometry

* support to check expectedErrno in system test on geometry

* adjust geomTest unit test and geometry system test

* add geometry data type and functions in doc english version

* implement touchesFunction() in geometry lib
refactor geometry relation functions model

* separate gemFuncTest into several src files

* add unit test on touchesFunction

* support sql function ST_Touches()
add system test on ST_Touches

* add docs for ST_Touches()

* Add ST_Contains()

* Add ST_Covers()

* Add ST_Equals()

* add swapAllowed param for geomRelationFunction()
read geom2 earlier intead of at doGeosRelation()

* Add ST_ContainsProperly()

* build on windows

* Merge from 3.0 to 3.0_geometry

* change macro definition TSDB_DATA_TYPE_GEOMETRY as the last one for compatibility

* change '\\NULL' to 'NULL' back in shellDumpFieldToFile()

* add /usr/local/include into include directory

* add /usr/local/inlcude and /usr/local/lib in cmake.platform for DARWIN
2023-05-24 15:36:46 +08:00
slzhou f9da4abdcb fix: change more variable names 2023-05-19 15:38:52 +08:00
shenglian zhou f36b0be17d fix: join eq conditions not only for tag 2023-05-19 14:32:03 +08:00
dapan1121 cf7b4593e7 feat: add drop dnode unsafe command 2023-05-16 09:50:10 +08:00
shenglian zhou 629ab2b85f fix: extract tag equal condition 2023-05-15 16:10:11 +08:00
Haojun Liao 99148d6719 other: merge 3.0 2023-05-13 20:02:48 +08:00
yihaoDeng 5708fcb5cb Merge branch 'enh/3.0' into enh/rocksdbSstateMerge 2023-05-10 08:02:16 +00:00
dapan1121 a8c65cd25a feat: support restore dnode clause 2023-05-09 19:19:14 +08:00
dapan1121 a1eefd25ea fix: count wrong group number issue 2023-05-09 11:33:47 +08:00
Xiaoyu Wang dc5235eb92 feat: add pause/resume stream statement 2023-04-24 14:48:33 +08:00
cadem ea35f0ae11 feat/balance vgroup leader 2023-03-22 09:36:59 +08:00
Xiaoyu Wang 5b7ec8ade5 fix: invalid write memory when query policy is 4 2023-02-28 10:41:13 +08:00
Xiaoyu Wang 3382a24a69 merge main 2023-02-10 18:03:11 +08:00
Xiaoyu Wang 98e2fa2d7b feat: add ignore update option for create stream 2023-02-08 18:46:12 +08:00
Hongze Cheng 5a56e39613 Merge branch '3.0' of https://github.com/taosdata/TDengine into feat/vnode_compact 2023-02-08 11:15:51 +08:00
Xiaoyu Wang 8b6a50d970 feat: add explain test case 2023-02-07 18:35:42 +08:00
Xiaoyu Wang 9df6f69371 merge 3.0 2023-01-04 15:02:31 +08:00
Xiaoyu Wang fdde287ca9 merge main 2023-01-04 11:43:20 +08:00
Alex Duan 0c422345b3 feat: support show cluster alive; and show db.alive; 2022-12-29 18:07:57 +08:00
Ganlin Zhao b55af6372c fix(query): fix count/hyperloglog return additional row in group by
when queryPolicy is set to 3.
2022-12-28 17:28:40 +08:00
Xiaoyu Wang b52ebb6fd5 feat: sql command 'compact database' 2022-12-27 11:11:02 +08:00
Shengliang Guan 664dcb6b4e Merge branch 'main' into merge/mainto3.0_1226 2022-12-26 09:26:54 +08:00
Xiaoyu Wang 72fe37888f enh: improve unit tests 2022-12-21 17:24:54 +08:00
Xiaoyu Wang aecd05cf34 enh: improve unit tests 2022-12-21 13:51:06 +08:00
Xiaoyu Wang ad7f9b274b enh: improve unit tests 2022-12-20 16:53:08 +08:00
Xiaoyu Wang c6701221d6 enh: improve unit tests 2022-12-20 12:46:26 +08:00
dapan1121 978d45ffc1 enh: optimize converting timestamp at client side 2022-12-15 16:56:35 +08:00
Xiaoyu Wang 2f9753c540 event window query 2022-12-13 14:18:03 +08:00
Xiaoyu Wang bc36bc188e feat: event window 2022-12-08 09:36:37 +08:00
Xiaoyu Wang bc413b8fff feat: add stream option 'delete_mark' 2022-12-06 16:07:11 +08:00
Xiaoyu Wang cfbcf92c1f Merge remote-tracking branch 'origin/3.0' into enh/3.0_planner_optimize 2022-11-30 14:29:34 +08:00
Xiaoyu Wang f3681433c6 fix: stream plan error 2022-11-29 16:43:12 +08:00
Xiaoyu Wang 555f2cb981 merge 3.0 2022-11-29 13:16:54 +08:00
Xiaoyu Wang 70164f9f20 enh: group by tbname optimize 2022-11-24 15:16:38 +08:00
Xiaoyu Wang bc180e39c9 enh: ins_tables optimize 2022-11-22 16:39:30 +08:00
Xiaoyu Wang 40c7562470 enh: optimize statement for querying the number of sub tables of the super table 2022-11-15 16:38:51 +08:00
Xiaoyu Wang e8c0515dce enh: flag of whether the subplan is added as a show statement 2022-10-28 10:46:04 +08:00
Xiaoyu Wang 02ac6fa552 enh: add unit test and delete useless code 2022-10-26 17:01:55 +08:00
dapan1121 55a26990da feat: support case when cases 2022-10-08 19:07:43 +08:00
54liuyao 747297bd28 feat(stream): stream fill 2022-09-27 18:11:44 +08:00
Xiaoyu Wang 1d62834e5c feat(stream): tag and child table name improvement 2022-09-26 18:39:47 +08:00
Shengliang Guan 778aa44fc2
Merge pull request #17018 from taosdata/fix/3.0_bugfix_wxy
fix: subplans under set operator use different group ids
2022-09-23 14:03:05 +08:00
Shengliang Guan f80068bbe6
Merge pull request #17011 from taosdata/feat/3.0_parser_planner
feat: case when expression
2022-09-23 11:41:57 +08:00
Xiaoyu Wang ee9190e9c0 fix: subplans under set operator use different group ids 2022-09-23 11:26:03 +08:00
Xiaoyu Wang 50ebcb5006 feat: case when expression 2022-09-22 19:20:21 +08:00
Xiaoyu Wang 0321b8c088 fix: avg function data scan optimization 2022-09-22 15:08:07 +08:00
Xiaoyu Wang e2586979eb enh: the delete physical plan increases the timestamp interval of the actual deleted data 2022-09-14 17:51:21 +08:00
Xiaoyu Wang 983ac86a49 enh: add binary serialization method to node structure 2022-09-06 13:40:43 +08:00
54liuyao 83e62c3849 feat(stream):stream partition by column 2022-09-01 15:05:24 +08:00
Xiaoyu Wang 99490c063e feat: system table visible permission 2022-08-24 17:36:10 +08:00
Xiaoyu Wang 09cb575300 fix: escape character problem in auto create table insert 2022-08-19 11:10:56 +08:00
Haojun Liao dc991a9040 other:merge 3.0 2022-08-12 14:51:52 +08:00
Xiaoyu Wang 4f0c6d3aa4 enh: show command optimize 2022-08-11 15:37:26 +08:00
Xiaoyu Wang 07ef00e89f merge 3.0 2022-08-09 11:36:08 +08:00
Xiaoyu Wang 4345631d3c fix: project adds whether to ignore the field of group id 2022-08-08 18:32:04 +08:00
Xiaoyu Wang f8bd778979 enh: the fill physical scheme distinguishes between interpolated and non-interpolated expressions 2022-08-02 16:18:53 +08:00
Xiaoyu Wang a62a7cc41f enh: aggregate and window add field for merge data blocks 2022-08-01 21:05:44 +08:00
Xiaoyu Wang 15a08b9999 fix: some problems of planner 2022-07-30 15:29:57 +08:00
Xiaoyu Wang 547ab7028b enh: last function optimize 2022-07-29 13:38:24 +08:00
Cary Xu 21fba3cb1f other: revert the walWrite.c 2022-07-28 17:15:31 +08:00
Cary Xu 0dcb3a5da1 fix: assign uid for rsma by physical plan 2022-07-28 17:07:47 +08:00
WANG MINGMING 7badec9ecc
Merge pull request #15477 from taosdata/feature/TD-14761
feat:add ts,table name from SDeleterRes
2022-07-27 20:16:00 +08:00
wangmm0220 2ba6ac5fba feat:add ts,table name from SDeleterRes 2022-07-27 17:11:57 +08:00
Xiaoyu Wang 58514862e6 feat: delete sink node add ts column name attribute 2022-07-27 15:25:57 +08:00
slzhou@taodata.com 3469117732 fix: add input ts order to physical plan join node 2022-07-27 15:12:23 +08:00
Xiaoyu Wang 015193e816 feat: super table order by primary key optimization 2022-07-25 15:17:53 +08:00
Liu Jicong 2fddb8a6d6 feat(tmq): check alter 2022-07-22 17:10:40 +08:00
Xiaoyu Wang d7c4549324 fix: the problem of data loss when interval is used for outer query 2022-07-22 10:38:11 +08:00
Xiaoyu Wang 5988fc0e4a feat: sql command 'show tags from table_name' 2022-07-19 15:31:44 +08:00
Xiaoyu Wang b7e5780c44 feat: sql statement likes 'select * from (select 1)' 2022-07-18 16:55:31 +08:00
Xiaoyu Wang 7c585d8ed9 fix: database options 'strict' and 'cachelast' syntax adjustments 2022-07-16 11:47:26 +08:00
Xiaoyu Wang a497ad72fa
Merge pull request #14899 from taosdata/feature/3.0_debug_wxy
fix: some problems of planner
2022-07-14 17:31:50 +08:00
Xiaoyu Wang ddb39a8dc2 fix: some problems of planner 2022-07-14 16:06:28 +08:00
shenglian-zhou 5b1cb74c99
Merge pull request #14880 from taosdata/szhou/fix/td-17263
fix: set primary key target slot id through searching scan cols and finding colId that equals primary key id
2022-07-14 10:13:29 +08:00
slzhou@taodata.com 414b27fb6a fix: set primary key target slot id through searching scan cols and find colId that equals primary key id 2022-07-14 09:19:36 +08:00
Xiaoyu Wang 4830b7d9d3 feat: support pseudo columns such as _qstart, _qend and _qduration 2022-07-13 18:12:02 +08:00
Xiaoyu Wang 8b89492101 fix: some problems of parser 2022-07-12 15:11:55 +08:00
Xiaoyu Wang 72738040a9 fix: some problem of parser and planner 2022-07-10 16:44:50 +08:00
Xiaoyu Wang f3e70272cf Merge remote-tracking branch 'origin/3.0' into feature/3.0_debug_wxy 2022-07-08 09:37:34 +08:00
dapan1121 82dbf54719 Merge branch 'fix/dnode' of github.com:taosdata/TDengine into fix/dnode 2022-07-06 20:34:07 +08:00
dapan1121 a3bf5b96c4 fix: fix query redirect issue 2022-07-06 20:33:23 +08:00
Xiaoyu Wang 025b7782e1 feat: add db option 'cachelastsize' 2022-07-06 18:47:33 +08:00
Xiaoyu Wang c1eef9911b feat: sql command 'insert ... select' 2022-07-06 16:16:54 +08:00
Xiaoyu Wang a67eb1a9a0 eat: sql command 'insert ... select' 2022-07-06 11:55:47 +08:00
Xiaoyu Wang c8508248e2 feat: sql command 'insert ... select' 2022-07-05 21:12:10 +08:00
slzhou 024796599c Merge branch '3.0' of github.com:taosdata/TDengine into szhou/feature/push-cond-child-proj 2022-07-04 20:14:15 +08:00
slzhou a380e0cd7c feat: merge condition, on condition and other conditions 2022-07-04 19:49:16 +08:00
wangmm0220 4e6b3d72ac Merge branch '3.0' into feature/TD-13041 2022-07-01 16:54:18 +08:00
wangmm0220 085ace59e0 fix:to_json() function 2022-07-01 16:47:54 +08:00
Xiaoyu Wang 8c2e9842e2
Merge pull request #14393 from taosdata/feature/3.0_debug_wxy
feat: support 'select *, expr from ...' syntax
2022-06-30 18:25:12 +08:00
Xiaoyu Wang dc769a284f feat: support 'select *, expr from ...' syntax 2022-06-30 17:12:03 +08:00
Xiaoyu Wang 1530b33991 feat: support 'select *, expr from ...' syntax 2022-06-30 16:16:05 +08:00
dapan1121 47bc36872f feat: query redirect 2022-06-30 13:44:26 +08:00
dapan1121 a535df7590 feat: query redirect 2022-06-30 11:04:49 +08:00
Xiaoyu Wang a334337755 feat: merge and merge scan add group sort field 2022-06-27 15:57:02 +08:00
Xiaoyu Wang 7b60b3223b feat: tail function rewrite to statement 2022-06-26 14:44:58 +08:00
Xiaoyu Wang c41a4bd7db feat: subplan adds 'user' field 2022-06-24 17:27:43 +08:00
Xiaoyu Wang 0b9eb79bf7 merge 3.0 2022-06-23 18:08:47 +08:00
Xiaoyu Wang 4fcd667bf6 feat: sql command 'show consumers' and 'show subscriptions' 2022-06-23 18:03:15 +08:00
WANG MINGMING 15eb9c485e
Merge pull request #14069 from taosdata/3.0
feat:merge from 3.0
2022-06-22 16:33:15 +08:00
shenglian-zhou 17603ba292
Merge pull request #14098 from taosdata/szhou/feature/merge-interval-2
fix: change merge interval to merge aligned interval
2022-06-22 11:27:41 +08:00
shenglian zhou 84ea04ea2a fix: change merge interval to merge aligned interval 2022-06-22 10:53:22 +08:00