Commit Graph

48 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
Haojun Liao 22aa03307c fix(query): fix syntax errors on centos. 2023-02-24 11:38:54 +08:00
yihaoDeng 3e738363aa add/delete tag index 2023-01-11 13:36:07 +08:00
yihaoDeng c9aadfadee fix coverity scan problem 2022-10-17 16:29:50 +08:00
yihaoDeng 4977e2e676 opt tbname in 2022-09-29 18:35:12 +08:00
yihaoDeng 636004199b fix(idx): fix index read crash 2022-09-27 21:32:18 +08:00
yihaoDeng 47ff0e34b0 refactor idx code 2022-09-01 20:16:02 +08:00
yihaoDeng 399d240df5 refactor index 2022-08-10 15:41:12 +08:00
yihaoDeng baa21c8398 Merge branch '3.0' of https://github.com/taosdata/TDengine into dev 2022-07-15 14:58:00 +08:00
yihaoDeng 35e8ad2811 feat: add time unsynced check 2022-07-15 14:51:20 +08:00
yihaoDeng ca7ca2f1e3 refactor code 2022-07-14 19:23:01 +08:00
yihaoDeng 2cf01e0782 add test case 2022-07-08 20:50:11 +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 eab330c092 enh: refactor index code 2022-06-09 15:14:11 +08:00
yihaoDeng d9c83f6357 enh: change rpcGetConnInfo 2022-06-09 13:50:18 +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 7e5dd50235 fix: add col type 2022-06-08 13:21:07 +08:00
yihaoDeng fb389ab826 fix: avoid filter failure 2022-06-07 21:43:30 +08:00
yihaoDeng 9105c19e42 fix: add json contains 2022-06-07 16:02:41 +08:00
yihaoDeng 414d0f2e75 fix: failed to update json idx 2022-06-06 22:12:57 +08:00
yihaoDeng e7fe3577e5 enh: refactor index/trans 2022-06-01 14:30:01 +08:00
yihaoDeng 55c7d1c1e9 fix: close cause flush result error 2022-05-31 22:17:18 +08:00
yihaoDeng 0b0253f2d1 enh: support tag filter 2022-05-28 17:30:44 +08:00
yihaoDeng 6acbe7e777 enh: support tag filter 2022-05-28 16:15:24 +08:00
yihaoDeng 8ef6eb4c5f enh: refactor index code 2022-05-24 15:17:14 +08:00
yihaoDeng f0da893bfb fix: avoid multi thread read/write crash 2022-05-23 21:59:47 +08:00
yihaoDeng 5a0e7dfa74 enh: refator index/transport code 2022-05-22 19:58:42 +08:00
yihaoDeng 8f75b96ed4 enh: refator index/transport code 2022-05-21 23:33:39 +08:00
yihaoDeng 4d18fa0875 enh: refator index/transport code 2022-05-21 17:29:50 +08:00
yihaoDeng 9a6710b465 enh: add invert index to vnode 2022-05-20 23:39:52 +08:00
yihaoDeng af9abca851 enh: add UT to CI 2022-05-19 17:38:11 +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 d4c550db66 enh(query): add executor plan interface 2022-05-10 21:35:43 +08:00
yihaoDeng 6c844c7567 enh(index): support numberic and json filter 2022-05-09 23:34:48 +08:00
yihaoDeng 5b2d99e6f1 enh(index): support numberic and json filter 2022-05-07 22:38:17 +08:00
yihaoDeng 8240b10a3e enh(index): support more data type 2022-05-06 21:36:39 +08:00
yihaoDeng e08dd100a4 enh(index): support more data type 2022-05-06 18:39:28 +08:00
yihaoDeng fb7da7e566 enh(index): support index filter 2022-05-04 21:02:27 +08:00
yihaoDeng 5ed7b44b16 enh(index): support index filter 2022-05-04 12:35:05 +08:00
yihaoDeng 8e7cf4a661 enh(index): add prefix query 2022-05-03 20:14:53 +08:00
yihaoDeng f6e51532ed enh(index): add prefix query 2022-05-02 22:46:59 +08:00
yihaoDeng 26f2d342b0 enh(index): add prefix query 2022-05-02 22:15:51 +08:00
yihaoDeng a1d40669dc add fuzzy search 2022-03-31 11:21:53 +08:00
yihaoDeng 5cf0c4a61c update code style 2022-03-29 23:11:57 +08:00