Commit Graph

136 Commits

Author SHA1 Message Date
wangjiaming0909 952d6e1492 fix: coverity issues 2023-09-08 10:26:37 +08:00
dapan1121 cc17848b78 fix: merge 3.0 to main 2023-09-01 13:24:47 +08:00
Shungang Li 8f91da24e4 fix: type convert failure returns errcode
TSDB_CODE_SCALAR_CONVERT_ERROR:
"Cannot convert to specific type"
2023-07-11 10:20:50 +08:00
Shungang Li 308ba7a02e fix: type geometry predicates support
support "=, <>, is null, is not null, in, not in"
2023-06-29 09:44:51 +08:00
dapan1121 e2d45438cb
Merge pull request #21405 from taosdata/szhou/scl-flt
enhance: scalar filter improvement
2023-05-28 18:49:39 +08:00
slzhou 81c796953e fix: address sanitizer error 2023-05-26 10:55:52 +08:00
slzhou de1848cb08 enhance: use scalar mode to run ci test 2023-05-25 14:51:53 +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
54liuyao 8a23f0ce3b fix:set timestamp precision 2023-03-01 18:59:27 +08:00
Haojun Liao 7fe250412f refactor:do some internal refactor. 2023-02-20 10:13:11 +08:00
Haojun Liao 8d187efc18 refactor:do some internal refactor. 2023-02-20 10:04:08 +08:00
Ganlin Zhao e3b776c7f3 Merge branch 'main' into enh/TD-21206 2023-01-04 09:18:38 +08:00
Ganlin Zhao 8146113835 fix asserts in sclvector.c 2023-01-03 15:27:54 +08:00
Haojun Liao 7eeea8a29c fix(query): fix the invalid access, and do some internal refactor. 2022-12-29 17:56:20 +08:00
Haojun Liao 011c83956b refactor: do some internal refactor. 2022-12-28 19:12:36 +08:00
Haojun Liao 1e69538c37 fix(query): opt filter perf. 2022-12-27 16:55:38 +08:00
Shengliang Guan d9c261cd13 refact: remove some error codes 2022-12-03 10:17:02 +08:00
Haojun Liao f8a2ab8338 refactor: do some internal refactor. 2022-12-01 17:24:26 +08:00
Haojun Liao dac930352b enh(query): optimize the perf in compare. 2022-11-29 12:22:04 +08:00
Haojun Liao 5a3e4dc1c8 fix(query): set correct null check function. 2022-11-28 19:48:04 +08:00
Haojun Liao b53957c7bb fix(query): set correct ptr. 2022-11-28 18:57:36 +08:00
Haojun Liao b2b26f0c3c refactor: add an revised function to do compare. 2022-11-28 18:52:14 +08:00
Haojun Liao 90c1e7347f refactor: do some internal refactor. 2022-11-28 18:42:39 +08:00
yihaoDeng ef8c68a098 fix TD-20751 mem leak 2022-11-25 19:38:06 +08:00
wangmm0220 d212be8a37 fix:defects in coverity 2022-10-26 17:54:19 +08:00
Ganlin Zhao 3a4dc8f0da Merge branch '3.0' into fix/coverity_glzhao 2022-10-25 09:47:46 +08:00
Ganlin Zhao 120a3ca4b9 fix: coverity issues
CID: 400059
2022-10-24 15:18:27 +08:00
Haojun Liao c41713cf21
Merge pull request #17495 from taosdata/fix/liao_cov
refactor: remove redundant codes and do some internal refactor.
2022-10-20 13:16:02 +08:00
Haojun Liao ae625d3199 refactor: remove redundant codes and do some internal refactor. 2022-10-19 22:33:15 +08:00
dapan1121 fe5b898ee5
Merge pull request #17430 from taosdata/fix/TD-19609
fix: fix case when crash issue
2022-10-18 17:37:37 +08:00
dapan1121 ab7a00abbe fix: fix case when crash issue 2022-10-18 11:54:30 +08:00
dapan1121 bdb81e2b89 fix: fix varchar and bigint compare issue 2022-10-18 10:44:24 +08:00
dapan1121 f3919c4450 Merge remote-tracking branch 'origin/3.0' into feat/caseWhen 2022-10-14 09:14:01 +08:00
Hongze Cheng d8e32fb439 more code format 2022-10-13 14:03:23 +08:00
dapan1121 a13f553868 Merge remote-tracking branch 'origin/3.0' into feat/caseWhen 2022-10-12 13:33:41 +08:00
dapan1121 c485718d32 feat: add more case when cases 2022-10-12 11:46:49 +08:00
Ganlin Zhao e5c3ff7158 fix: coverity issues
CID: 399950
2022-10-11 17:08:30 +08:00
Ganlin Zhao 936c7b6276 fix: coverity issues
CID: 400042
2022-10-11 16:00:19 +08:00
dapan1121 50b396c818 fix: fix case when issues 2022-09-30 18:13:55 +08:00
dapan1121 2d3992b72b feat: support case when clause 2022-09-29 19:19:49 +08:00
Haojun Liao 721112140f fix(query): assign qualified value. 2022-09-21 13:51:36 +08:00
Haojun Liao 33c075542d refactor(query): do some internal refactor. 2022-09-21 10:26:55 +08:00
dapan1121 44dcaf2517 fix: fix type convertion issue 2022-08-29 09:28:38 +08:00
dapan1121 d18e7cd739 enh: remove compare type convertion 2022-08-26 16:20:07 +08:00
Haojun Liao e31ee23fbb fix(query): fix memory leak. 2022-08-04 15:44:42 +08:00
Haojun Liao fc7887e6b7 fix(query): update the sim. 2022-07-20 17:24:49 +08:00
wangmm0220 a15bd187bf fix:error in json tag 2022-07-14 16:24:16 +08:00
dapan1121 8c83f07fe4 fix: fix natural timestamp issue 2022-07-13 16:43:50 +08:00
dapan1121 6cd21fe04b enh: enhance in operator 2022-07-10 16:52:11 +08:00
Haojun Liao 3e81daf578 fix(query): fix memory leak. 2022-07-08 17:28:37 +08:00