Commit Graph

24 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 d83f29dc23 refactor: remove assert. 2023-04-27 15:33:04 +08:00
Ganlin Zhao 4b81962269 fix asserts 2023-01-04 09:16:00 +08:00
Shengliang Guan b5f0041af1 refact: adjust error code in vnode 2022-11-02 15:28:32 +08:00
Ganlin Zhao f4c290d545 fix: coverity issues
CID: 399791
2022-10-24 14:43:36 +08:00
Hongze Cheng 6ed0634fb7 format more code 2022-10-13 11:56:16 +08:00
Ganlin Zhao fc598288be fix: coverity issues
CID: 400233
2022-10-11 14:15:00 +08:00
Ganlin Zhao 5583ee42c0 fix: coverity issues
CID: 400233
2022-10-11 11:29:42 +08:00
afwerar e76f770fc8 os: fix minimalDirGB invalid error 2022-08-04 10:02:09 +08:00
afwerar d67339bfc8 os: fix minimalDirGB invalid error 2022-08-03 20:17:53 +08:00
afwerar b9a1c6744c os: add Mac compile support 2022-07-02 17:40:23 +08:00
afwerar c11946fd75 [TD-13756]<fix>: Fix macro name error. 2022-04-11 18:55:43 +08:00
afwerar 222db126bc [TD-13758]<fix>: redefine memory api. 2022-03-26 00:29:53 +08:00
Shuduo Sang 23bef711fc
Feature/sangshuduo/td 13063 3.0 windows (#10720)
* [TD-13063]<feature>: 3.0 on Windows

* add pthread in contrib

* fix linux compile

* fix osSemaphore

* add gnu regex for Windows

* fix compile error for Windows

* support arm platform

* port more OS files

* fix for Windows compile

* port more files

* fix macOS on x86_64

* port osFile

* port osSemaphone.h

* port osSocket.c

* port tconfig.c

* port ttimer.c

* add couple files
2022-03-15 21:35:04 +08:00
afwerar 71e4c41941 [TD-13756]<fix>: file system remove func. 2022-03-04 16:45:20 +08:00
afwerar 2b9dc8c7ea [TD-13062]<fix>: file system add stream. 2022-02-28 22:37:32 +08:00
Shengliang Guan 26adff1fa5 minor changes 2022-02-28 19:32:48 +08:00
Shengliang Guan 175cbfb82d common 2022-02-28 17:46:02 +08:00
Shengliang Guan e25637fe29 Merge remote-tracking branch 'origin/3.0' into feature/config 2022-02-25 10:05:54 +08:00
afwerar 5a37fdf28f [TD-13062]<fix>: cross platform file system. 2022-02-25 01:47:20 +08:00
Shengliang Guan 612dd71918 os env 2022-02-24 21:27:13 +08:00
Shengliang Guan beae4899f2 os env 2022-02-24 11:35:22 +08:00
Haojun Liao 699a94cced [td-11818] opt perf 2022-02-11 10:14:56 +08:00
Haojun Liao f69a885da5 [td-10564]Add implementation in executor. 2021-11-02 13:37:31 +08:00