Commit Graph

2145 Commits

Author SHA1 Message Date
wangjiaming0909 73585b3552 fix: select desc and asc return different rows after delete 2023-06-05 17:44:34 +08:00
Ganlin Zhao 005182c3c9 fix multiple interp issue 2023-06-05 16:40:48 +08:00
Ganlin Zhao 6b670b7f08 fix desc 2023-06-05 15:48:15 +08:00
Ganlin Zhao be34546edd enh: enable interp fill value support scarlar expression 2023-06-05 15:19:06 +08:00
dapan1121 ddd3a53e56 Merge remote-tracking branch 'origin/3.0' into fix/TD-24001 2023-06-02 13:57:34 +08:00
Haojun Liao d45aa7ef84
Merge pull request #21555 from taosdata/fix/liaohj_main
other: merge main into 3.0.
2023-06-02 13:11:12 +08:00
dapan1121 6dda2e94f4 fix: distinct primary timestamp issue 2023-06-02 11:42:25 +08:00
Haojun Liao 5301c5756a other: merge main into 3.0. 2023-06-01 09:29:18 +08:00
dapan1121 23bcfc2fd0 enh: stmt column length validation 2023-05-31 09:16:47 +08:00
wangmm0220 b8a4df4146 fix:avoid put tag to select if where condition is always true or false 2023-05-30 16:50:20 +08:00
Ganlin Zhao 1009c80967 fix bug 2023-05-30 14:21:32 +08:00
Ganlin Zhao b83a4b14e7 allow omit every clause for single point interp 2023-05-29 17:34:35 +08:00
Ganlin Zhao 57c301553b feat(query): support single point interp syntax 2023-05-29 16:40:30 +08:00
dapan1121 ccf57129bb fix: show create table privilege issue 2023-05-29 16:33:31 +08:00
wangmm0220 78db3520a6 fix:conflict 2023-05-29 14:57:03 +08:00
dapan1121 60588af694 fix: add topic query 2023-05-29 13:33:51 +08:00
wangmm0220 208ba2ef4d fix:memory leak 2023-05-26 10:45:37 +08:00
dapan1121 e70c433a59 enh: support time line query from union/union all subquery 2023-05-26 08:44:23 +08:00
dapan1121 2713f4f6d4 feat: support create topic as stable with conditions 2023-05-25 19:01:58 +08:00
wangmm0220 357e86b994 feat:add tag filter for stable subscribe 2023-05-24 18:59:47 +08:00
wangmm0220 8537e4e80e feat:add tag filter for stable subscribe 2023-05-24 18:26:55 +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
dapan1121 b52f867a1f fix: rebuild table data issue 2023-05-24 09:56:59 +08:00
dapan1121 5bedf6b19a enh: support config batch rows number when import data from csv file 2023-05-23 19:21:52 +08:00
wangmm0220 8c1c2a2f97 fix:add grammar support 2023-05-23 17:47:17 +08:00
dapan1121 4c88fd08de Merge remote-tracking branch 'origin/3.0' into fix/TD-24001 2023-05-23 09:25:37 +08:00
dapan1121 70444e2d82
Merge pull request #21329 from taosdata/feat/TD-21187
feat(query): interp support ignore null value opition
2023-05-20 14:14:21 +08:00
dapan1121 d801aaa2e6
Merge pull request #21352 from taosdata/fix/TD-24218
fix: fix interp in nested query and fill value with string issue
2023-05-20 14:10:26 +08:00
dapan1121 6e5ec3d097
Merge pull request #21358 from taosdata/feat/TD-23362-3.0
feat: support update active code by SQL
2023-05-20 14:09:20 +08:00
Ganlin Zhao a3ca23b688 forbid interp ignoring null value used for multiple cols 2023-05-19 16:43:39 +08:00
Haojun Liao 1e020a46c9 other: merge main. 2023-05-19 09:07:35 +08:00
Haojun Liao d4b0e102af fix:do some internal refactor. 2023-05-19 08:55:59 +08:00
kailixu 8eb4367d46 fix: range check and test case adjust 2023-05-19 06:50:12 +08:00
Ganlin Zhao 0a41ba1573 add test cases 2023-05-18 18:48:00 +08:00
dapan1121 5ac91597b6
Merge pull request #21310 from wangjiaming0909/fix/TS-3398
fix: select <expr1>, <expr1##sth else> from ... return error data whe…
2023-05-18 10:07:06 +08:00
Ganlin Zhao 20684f873e fix interp in nested query report error 2023-05-17 17:49:07 +08:00
dapan1121 ab7cb995a2 fix: join push down condition issue 2023-05-17 15:31:53 +08:00
wangjiaming0909 789b0c7178 fix: select <expr1>, <expr1##sth else> from ... return error data when strlen(expr1) > TSDB_COL_NAME_LEN 2023-05-16 15:42:30 +08:00
dapan1121 cf7b4593e7 feat: add drop dnode unsafe command 2023-05-16 09:50:10 +08:00
Haojun Liao 99148d6719 other: merge 3.0 2023-05-13 20:02:48 +08:00
Haojun Liao 236926b9ee other: merge enh/rocksdbstate 2023-05-13 19:49:28 +08:00
Haojun Liao 1975e94501 Merge branch 'main' into enh/rocksdbSstate 2023-05-13 19:41:03 +08:00
dapan1121 0c744e864b
Merge pull request #21258 from taosdata/szhou/fix-td24084
fix: bypass projection pruning if union set op and subquery
2023-05-12 17:02:54 +08:00
dapan1121 9394afec68
Merge pull request #21144 from taosdata/feat/TD-19801
feat(query): support interp with super table
2023-05-12 11:37:20 +08:00
kailixu f4d90fb9bb fix: column length check when update/add column 2023-05-11 20:59:07 +08:00
slzhou e8c1745d17 Merge branch 'main' of github.com:taosdata/TDengine into szhou/fix-td24084 2023-05-11 16:04:46 +08:00
slzhou e58fda2bdd fix: bypass projection pruning if union set op and subquery 2023-05-11 16:04:06 +08:00
yihaoDeng 5708fcb5cb Merge branch 'enh/3.0' into enh/rocksdbSstateMerge 2023-05-10 08:02:16 +00:00
dapan1121 eb7cd25e2e enh: support nest partition by clause 2023-05-10 14:34:41 +08:00
Yihao Deng c6e5879f44
Merge branch 'main' into enh/rocksdbSstate 2023-05-10 10:04:28 +08:00
dapan1121 7ab11c42f4 fix: vnode key word issue 2023-05-10 09:07:52 +08:00
yihaoDeng 8356533eb1 Merge branch 'enh/standVer' into enh/rocksdbSstateMerge 2023-05-09 12:13:16 +00:00
dapan1121 2c403266e3 feat: support restore dnode clause 2023-05-09 19:29:57 +08:00
dapan1121 a8c65cd25a feat: support restore dnode clause 2023-05-09 19:19:14 +08:00
dapan1121 7ea23a33bc enh: optimize time line function validation 2023-05-09 16:37:08 +08:00
shenglian zhou 50feb64748 fix: add check nchar/varchar column length for normal table 2023-05-09 14:29:09 +08:00
dapan1121 5d4830956a
Merge pull request #21187 from taosdata/szhou/fix-ts23905-ts23865
fix: forbid some stream computing
2023-05-08 16:24:00 +08:00
slzhou 2f45a3dfdb fix: change variable name 2023-05-08 14:42:31 +08:00
yihaoDeng 08c3a63341 Merge branch 'enh/standVer' into enh/rocksdbSstateMerge 2023-05-06 12:37:54 +00:00
slzhou 04e9648d8e enhance: change variable name 2023-05-06 17:16:27 +08:00
slzhou 276e5daa8c fix: pseudo column function are treated as variable 2023-05-06 17:13:14 +08:00
shenglian zhou 83c857a017 fix: fix compilation error 2023-05-06 16:17:34 +08:00
shenglian zhou c8ac3a581e fix: forbid some stream computing 2023-05-06 15:50:38 +08:00
dapan1121 e798ef8645
Merge pull request #21168 from taosdata/fix/TD-23985
fix: having clause issues
2023-05-06 13:40:42 +08:00
Haojun Liao da6212bab0 other: merge main. 2023-05-06 12:51:38 +08:00
dapan1121 47791dfe2f fix: group by validation issue 2023-05-06 11:02:20 +08:00
Haojun Liao 5d4a3116d5
Merge pull request #21139 from taosdata/fix/liaohj_main
refactor: do some internal refactor.
2023-05-06 09:49:26 +08:00
dapan1121 997be0a3ed fix: having clause issues 2023-05-05 17:04:36 +08:00
dapan1121 e889249c54 fix: grant no table specifed issue 2023-05-05 14:33:09 +08:00
dapan1121 3976504b47 fix: subtable grant is not allowed 2023-05-05 14:01:15 +08:00
Haojun Liao 23c49594b7 other: merge main. 2023-05-04 16:41:53 +08:00
Haojun Liao 09a04052ec refactor: do some internal refactor. 2023-05-04 16:15:14 +08:00
dapan1121 70761fd959 enh: optimize tbname condition 2023-04-28 17:56:52 +08:00
liuyao 2984c5a758 merge main 2023-04-28 10:34:46 +08:00
kailixu fa822ff286 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-27 19:11:16 +08:00
Haojun Liao e1bd65ec0a
Merge pull request #21105 from taosdata/fix/liaohj_main
fix(query): check the init status for pReader->status.merger  TD-23903
2023-04-27 12:40:13 +08:00
Haojun Liao db1d75bb48 refactor: do some internal refactor. 2023-04-27 09:28:20 +08:00
dapan1121 51a1e07dbf
Merge pull request #21029 from taosdata/fix/TD-23797
fix: fix crash caused by deleting from system table
2023-04-26 17:48:58 +08:00
Ganlin Zhao 0ec4bbdfbc enable interp used with super table 2023-04-26 09:48:13 +08:00
Xiaoyu Wang 05dc0fd6b1
Merge pull request #21056 from taosdata/feat/TD-23693
feat: subtable level privilege
2023-04-26 09:17:23 +08:00
kailixu a6e37622ff chore: more code 2023-04-25 22:15:06 +08:00
Xiaoyu Wang e584bb3ea1 feat: subtable level privilege 2023-04-25 17:39:28 +08:00
kailixu 2d4dd64584 chore: more code 2023-04-24 20:21:28 +08:00
dapan1121 de1161dafb enh: ignore single row null data type validation 2023-04-24 19:22:44 +08:00
Ganlin Zhao 80621e14eb refactor 2023-04-24 17:24:07 +08:00
Ganlin Zhao 782566ad08 refactor 2023-04-24 17:15:46 +08:00
Xiaoyu Wang dc5235eb92 feat: add pause/resume stream statement 2023-04-24 14:48:33 +08:00
Ganlin Zhao 1251245c2a move code to parser 2023-04-24 09:49:03 +08:00
Xiaoyu Wang 4bb7a25fc7 feat: subtable level privilege 2023-04-23 16:30:28 +08:00
Xiaoyu Wang aba9a236c0 compiled sql.y 2023-04-23 11:20:34 +08:00
yihaoDeng 917b07348c Merge branch 'fix/rocksdbState' into enh/rocksRevert 2023-04-23 02:37:26 +00:00
dapan1121 176f7740c3 fix: memory leak issue 2023-04-21 16:41:39 +08:00
kailixu 77a8e3b213 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-21 16:04:09 +08:00
dapan1121 877b6e7053 fix: add table_prefix/table_suffix cases 2023-04-21 14:58:58 +08:00
dapan1121 3c2fc48e74 feat: support new table_prefix/table_suffix mode 2023-04-21 14:17:07 +08:00
Xiaoyu Wang 0dad9322f3 fix: invalid identifier check 2023-04-20 15:08:41 +08:00
Xiaoyu Wang 5367f25b4d feat: the having clause can be used after the partition by clause or window clause 2023-04-19 16:55:08 +08:00
dapan1121 4a9d62b467 enh: ignore single row null data type validation 2023-04-19 10:18:41 +08:00
Xiaoyu Wang 61cc72c19a
Merge pull request #20961 from taosdata/enh/3.0_planner_optimize
feat: the fill value clause supports constant expressions
2023-04-18 16:24:29 +08:00
Xiaoyu Wang 1d2764ebdb feat: the fill value clause supports constant expressions 2023-04-18 15:36:50 +08:00