Commit Graph

34 Commits

Author SHA1 Message Date
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
yihaoDeng 329e257ac4 remove assert 2022-12-29 18:47:32 +08:00
Cary Xu 951d110b3b fix: coverity scan for trow 2022-10-20 09:31:17 +08:00
yihaoDeng c9aadfadee fix coverity scan problem 2022-10-17 16:29:50 +08:00
yihaoDeng 68a1c12dae add compile opt 2022-09-06 14:58:19 +08:00
yihaoDeng 47ff0e34b0 refactor idx code 2022-09-01 20:16:02 +08:00
Shengliang Guan 4401080328 enh: make cmake .. -DCMAKE_BUILD_TYPE=Release work 2022-08-31 18:06:17 +08:00
yihaoDeng 14cfbd7e45 fix tag/json tag error 2022-07-06 15:07:42 +08:00
afwerar 9dff7b93c6 test: fix sim test error 2022-06-21 20:04:55 +08:00
yihaoDeng f057cd1943 enh: refactor idx module 2022-06-09 17:22:42 +08:00
yihaoDeng daa2e86887 enh: refactor index code 2022-06-09 15:53:34 +08:00
yihaoDeng 485707b1cd refactor idx code 2022-06-08 22:40:05 +08:00
yihaoDeng dcc78597bf refactor index code 2022-06-08 21:51:28 +08:00
yihaoDeng 1f5ad0f1ec enh: index support between 2022-06-08 18:29:51 +08:00
yihaoDeng fb389ab826 fix: avoid filter failure 2022-06-07 21:43:30 +08:00
yihaoDeng 414d0f2e75 fix: failed to update json idx 2022-06-06 22:12:57 +08:00
yihaoDeng 7c9d76a6a6 enh: add json index 2022-06-04 22:33:36 +08:00
yihaoDeng 64ffbc1eea enh: support tag filter 2022-05-31 18:34:17 +08:00
yihaoDeng 9a6710b465 enh: add invert index to vnode 2022-05-20 23:39:52 +08:00
afwerar 51721dfc47 fix(os): win run error 2022-05-19 10:37:11 +08:00
Yihao Deng cb37bb3562
Merge pull request #12647 from taosdata/fix/invalid_read
Fix/invalid read
2022-05-18 16:40:35 +08:00
yihaoDeng 3de22159d8 fix: avoid invalid read/write 2022-05-18 15:32:23 +08:00
afwerar bf44937dca fix(os): win compile error 2022-05-18 14:21:04 +08:00
yihaoDeng 48cb91562e merge 3.0 2022-05-17 22:39:32 +08:00
yihaoDeng e96ff087f2 fix: index failed to filter float/double data 2022-05-17 22:22:39 +08:00
afwerar b7ca4f7710 fix(os): win str to int64 error 2022-05-17 13:50:16 +08:00
yihaoDeng ac32738964 fix tag query error 2022-05-16 23:12:02 +08:00
yihaoDeng 9453f80d65 fix(index): fix index condition error 2022-05-16 17:14:47 +08:00
yihaoDeng e8a637699b enh(index): fix tag query error 2022-05-15 23:29:13 +08:00
yihaoDeng c3760f2724 enh(index): fix tag query error 2022-05-14 23:40:43 +08:00
yihaoDeng 70171a66e0 enh(index): fix sanitizer error 2022-05-14 20:53:40 +08:00
yihaoDeng 6c844c7567 enh(index): support numberic and json filter 2022-05-09 23:34:48 +08:00
yihaoDeng 8240b10a3e enh(index): support more data type 2022-05-06 21:36:39 +08:00
yihaoDeng 5cf0c4a61c update code style 2022-03-29 23:11:57 +08:00