Commit Graph

19 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 03b1de017a refactor: remove assert. 2023-04-28 14:12:17 +08:00
Alex Duan 41cdb1e917 fix(coverage): remove the function about skiplist callback 2022-10-26 17:29:49 +08:00
Hongze Cheng 2268a1e94e fix some converity scan problem 2022-10-14 13:34:25 +08:00
Cary Xu 54420f06fc feat: put dup record in the last 2022-05-19 09:23:15 +08:00
afwerar fc24521621 fix(os): windows compile 3.0. 2022-04-22 09:54:27 +08:00
afwerar 222db126bc [TD-13758]<fix>: redefine memory api. 2022-03-26 00:29:53 +08:00
afwerar 79057240bd [TD-13759]<fix>: redefine thread api. 2022-03-20 00:47:45 +08:00
afwerar e04ef027ab [TD-13768]<fix>: redefine time api. 2022-03-11 16:49:07 +08:00
afwerar c6de196769 [TD-13765]<fix>: redefine rand api. 2022-03-10 00:36:30 +08:00
Shengliang Guan 99bc4379f0 minor changes 2022-02-28 14:21:18 +08:00
Shengliang Guan 7eec493a43 compare 2022-02-28 13:25:23 +08:00
Shengliang Guan 15b18f4ce9 log 2022-02-27 11:05:46 +08:00
Shengliang Guan ecdb23c9db Remove warnings and adjust dependencies 2022-01-20 23:39:54 -08:00
Hongze Cheng 1b6c7a5923 make compile 2021-10-11 18:36:40 +08:00
Shengliang Guan 8ccd079f6e rename tulog.h ulog.h 2021-10-04 21:01:03 +08:00
Shengliang Guan 140ec7c8aa [TD-10430] adjust util and common module 2021-10-04 12:09:50 +08:00
Shengliang Guan c0a171b144 [TD-10430] adjust os module 2021-10-03 10:32:14 +08:00