Commit Graph

31 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
Hongze Cheng f523a96c2d fix compact problem 2023-02-10 13:38:21 +08:00
Hongze Cheng 52bf961622 more code 2022-10-12 11:09:42 +08:00
wangmm0220 9eff7ff43a refactor: schemaless function 2022-04-25 15:54:34 +08:00
Xiaoyu Wang ba80c7478f TD-14405 TD-14404 desc and reset query cache statement implement 2022-03-31 02:19:11 -04:00
Hongze Cheng 6d1477e693 more TDB 2022-03-28 02:26:27 +00:00
Liu Jicong 59a4eec186 stream extract to module 2022-03-25 20:19:09 +08:00
Hongze Cheng 6cd165bea7 disable TDB compile 2022-03-18 10:44:12 +00:00
afwerar 35b3edaea5 [TD-13756]<fix>: file system stat access func. 2022-03-04 00:04:57 +08:00
Shengliang Guan 29d56b0a64 init monitor module 2022-03-02 14:00:56 +08:00
afwerar 5a37fdf28f [TD-13062]<fix>: cross platform file system. 2022-02-25 01:47:20 +08:00
Shengliang Guan 4278439666 refact config 2022-02-24 18:13:57 +08:00
Shengliang Guan 5b698b3d4d Merge remote-tracking branch 'origin/3.0' into feature/config 2022-02-23 17:33:44 +08:00
Shengliang Guan aa6a0cb47f config interface 2022-02-18 21:28:03 +08:00
dapan1121 8f199e0eb8 feature/qnode 2022-02-17 19:30:43 +08:00
Xiaoyu Wang 721dec7dcc TD-13338 SELECT statement translate code 2022-02-10 11:15:09 -05:00
Hongze Cheng c8c09c8a8c refact 2022-01-13 02:12:24 +00:00
Hongze Cheng 9e3e40ad6e integrate TFS 2022-01-06 08:15:09 +00:00
dapan1121 ae5541f536 feature/qnode 2021-12-21 18:28:28 +08:00
Haojun Liao 4192f1add9 [td-11818] enable create database. 2021-12-17 16:42:26 +08:00
dapan1121 fb035bb331 add query lib 2021-12-14 17:13:31 +08:00
Hongze Cheng a1893dd80b refact 2021-11-10 21:43:29 +08:00
Haojun Liao c3f4d74f9b Merge branch '3.0' into feature/3.0_liaohj 2021-10-27 17:28:02 +08:00
lichuang 048329e95e [feeature][raft]refactor raft interface to sync 2021-10-25 09:29:37 +08:00
Haojun Liao b7917aa43b [td-10564] Add codes for query parsing. 2021-10-21 11:06:52 +08:00
Hongze Cheng 3908cbd341 add more module 2021-09-24 18:05:56 +08:00
Hongze Cheng b674e47786 add lru module 2021-09-24 15:20:59 +08:00
Hongze Cheng 70fbff751d change asvc to transport 2021-09-24 14:11:00 +08:00
Hongze Cheng 3c4d552182 refact 2021-09-23 15:50:12 +08:00
Hongze Cheng 5b04e39691 refact 2021-09-22 16:25:22 +08:00
Hongze Cheng 79aff97033 refact 2021-09-22 16:05:46 +08:00