Commit Graph

897 Commits

Author SHA1 Message Date
dapan1121 8da28aced2 fix: distinct constant value issue 2023-06-21 10:33:50 +08:00
dapan1121 23d88b7e5a fix: partition data order requirement issue 2023-06-15 11:22:32 +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
dapan1121 693bac60a0
Merge pull request #21430 from taosdata/fix/TD-24349
fix: last(tbname) out of memory issue
2023-05-24 08:52:49 +08:00
dapan1121 d66f45308c fix: fix last(tbname) out of memory issue 2023-05-23 14:06:29 +08:00
kailixu a37d2c40fc chore: error logs of create sma cols 2023-05-23 11:06:44 +08:00
kailixu 329797ce23 fix: add _wstart if not exists 2023-05-23 10:57:34 +08:00
kailixu a171c0c860 Merge branch '3.0' into fix/TD-21457-3.0 2023-05-23 09:27:31 +08:00
kailixu c75aa54a3d fix: tsdb read and append _wstart for tsma 2023-05-22 20:33:29 +08:00
dapan1121 840eb21825 fix: last(tag) report error issue 2023-05-22 18:19:39 +08:00
kailixu f18fc19d76 fix: tsdb read and tsma _wstart append 2023-05-22 16:13:50 +08:00
dapan1121 e7496d7b82
Merge pull request #21388 from wangjiaming0909/fix/TS-3423
fix: select last(*) ..group by tag return wrong rows of data
2023-05-22 11:13:26 +08:00
Haojun Liao 200c1a367b
Merge pull request #21378 from taosdata/fix/nodisk
fix(query): do some internal refactor, and fix the bug when calender duration exists in sliding and offset.
2023-05-19 19:30:04 +08:00
dapan1121 778b7b84fd
Merge pull request #21371 from taosdata/fix/TD-24234
fix: distinct wrong result issue
2023-05-19 18:15:04 +08:00
wangjiaming0909 3dbbe63092 fix: select last(*) ..group by tag return wrong rows of data 2023-05-19 16:50:27 +08:00
slzhou d77eefdc93 fix: change more variable names 2023-05-19 15:43:31 +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 6a1eb62dd4 fix: distinct group issue 2023-05-19 11:26:40 +08:00
Haojun Liao 1e020a46c9 other: merge main. 2023-05-19 09:07:35 +08:00
dapan1121 27b228b79b
Merge pull request #21365 from taosdata/fix/TD-24188
enh: optimize order by for partition by clause
2023-05-19 08:57:11 +08:00
dapan1121 79623860a4 fix: distinct wrong result issue 2023-05-18 17:41:01 +08:00
dapan1121 72e6319592 enh: optimize order by for partition by clause 2023-05-18 14:41:32 +08:00
slzhou 304423e27b Merge branch 'main' of github.com:taosdata/TDengine into szhou/fix-ts3405 2023-05-18 13:27:58 +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
Haojun Liao 041ffa91bd other: merge main. 2023-05-17 15:42:15 +08:00
dapan1121 ab7cb995a2 fix: join push down condition issue 2023-05-17 15:31:53 +08:00
slzhou 03e77288e8 fix: add on conditions null check and rightRowLocations no longer hides the outer scope rightRowLocations 2023-05-17 10:07:19 +08:00
shenglian zhou a51de5cc93 fix: add restriction 2023-05-16 16:31:58 +08:00
shenglian zhou c6555c3b37 fix: join operator finished 2023-05-16 16:25:55 +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
shenglian zhou 629ab2b85f fix: extract tag equal condition 2023-05-15 16:10:11 +08:00
Haojun Liao 5b2ef2a675 other: merge main and remove invalid return data for poll. 2023-05-13 02:31:39 +08:00
slzhou 51fa0aeb64 Merge branch 'main' of github.com:taosdata/TDengine into szhou/fix-ts3400 2023-05-13 00:02:03 +08:00
shenglian zhou 0ea8de64df fix: code refactor 2023-05-12 20:20:53 +08:00
slzhou 5b866edae7 fix: disable table count scan optimized when filters and group by both exist 2023-05-12 18:51:18 +08:00
Haojun Liao 7ef16e1922 other: merge main. 2023-05-12 11:49:53 +08:00
slzhou e58fda2bdd fix: bypass projection pruning if union set op and subquery 2023-05-11 16:04:06 +08:00
dapan1121 a1eefd25ea fix: count wrong group number issue 2023-05-09 11:33:47 +08:00
dapan1121 1526eb2923 fix: projection group merge issue 2023-05-08 10:28:07 +08:00
dapan1121 1f25cc57cd fix: projection merge issue 2023-05-06 16:39:40 +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
shenglian zhou 93ab81437f enhance: code refactor and operator full implement slimit 2023-04-25 11:08:58 +08:00
shenglian zhou 758427b3c4 fix: use slimit to indicate group for tag scan 2023-04-24 15:48:20 +08:00
Ganlin Zhao 1251245c2a move code to parser 2023-04-24 09:49:03 +08:00
Ganlin Zhao c5b3737702 fix: forbid delete from system table 2023-04-23 11:21:01 +08:00
shenglian zhou 3a9dddd619 enhance: modify inside isEligibleAgg func 2023-04-20 15:11:12 +08:00
shenglian zhou cc78a6356c fix: do not performace table count scan optimized where there are no agg functions 2023-04-20 13:54:22 +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