Commit Graph

56 Commits

Author SHA1 Message Date
wangmm0220 7441801e9d feat:support varbinary type 2023-08-15 13:57:05 +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
Haojun Liao 22aa03307c fix(query): fix syntax errors on centos. 2023-02-24 11:38:54 +08:00
yihaoDeng 329e257ac4 remove assert 2022-12-29 18:47:32 +08:00
Shengliang Guan d9c261cd13 refact: remove some error codes 2022-12-03 10:17:02 +08:00
yihaoDeng 4a01bc53c7 rm log 2022-10-28 18:29:59 +08:00
yihaoDeng 78df93e0ca fix invalid packet 2022-10-17 22:17:47 +08:00
yihaoDeng c9aadfadee fix coverity scan problem 2022-10-17 16:29:50 +08:00
yihaoDeng 738fddb814 fix coverity scan problem 2022-09-30 17:49:08 +08:00
yihaoDeng 3a9dee68cb opt tbname in 2022-09-30 11:30:07 +08:00
yihaoDeng 6e561a6c78 fix: fix mem leak 2022-09-14 14:46:14 +08:00
yihaoDeng f0c1950b63 refactor code 2022-09-07 19:39:44 +08:00
yihaoDeng 47ff0e34b0 refactor idx code 2022-09-01 20:16:02 +08:00
Shengliang Guan efb0127fbf refactor: adjust logs 2022-08-02 16:48:49 +08:00
Shengliang Guan d5aea7dac2 refactor: adjust sync log 2022-08-02 16:39:12 +08:00
yihaoDeng cace9b6be9 feat: add lru to index 2022-07-14 14:51:39 +08:00
yihaoDeng 577ebfeb4b fix compile error 2022-07-05 20:47:13 +08:00
yihaoDeng d00158ff69 refactor idx code 2022-07-05 17:48:28 +08:00
yihaoDeng f658c2caa3 fix tag error 2022-07-04 20:20:32 +08:00
yihaoDeng 8d1e2662c7 refactor index code 2022-07-01 11:50:41 +08:00
yihaoDeng 4b0e8a3919 feat: refactor index code 2022-06-30 20:00:46 +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 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 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 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 d067104ec1 fix: index memory error 2022-05-25 20:38:25 +08:00
yihaoDeng 8ef6eb4c5f enh: refactor index code 2022-05-24 15:17:14 +08:00
yihaoDeng 6ca5e3ae6e enh: opt index mutex 2022-05-24 13:50:33 +08:00
yihaoDeng f0da893bfb fix: avoid multi thread read/write crash 2022-05-23 21:59:47 +08:00
yihaoDeng fb4982f8ca merge 3.0 2022-05-22 21:41:55 +08:00
afwerar 8a0d6d6e99 fix(os): win not close file ctest error 2022-05-22 17:16:01 +08:00
afwerar 5acf419019 fix(os): win not close file ctest error 2022-05-21 23:47:39 +08:00
yihaoDeng 4d18fa0875 enh: refator index/transport code 2022-05-21 17:29:50 +08:00
yihaoDeng 9888d086c2 fix: avoid invalid read/write 2022-05-19 20:40:23 +08:00
yihaoDeng 3cbf4ad4d2 fix: avoid invalid read/write 2022-05-18 14:11:23 +08:00
yihaoDeng 3a76f83032 fix: index failed to filter float/double data 2022-05-17 22:31:11 +08:00
yihaoDeng e96ff087f2 fix: index failed to filter float/double data 2022-05-17 22:22:39 +08:00
yihaoDeng ac32738964 fix tag query error 2022-05-16 23:12:02 +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 8240b10a3e enh(index): support more data type 2022-05-06 21:36:39 +08:00