Commit Graph

50 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 1350af5267 fix(stream): set the correct initial checkpoint version to restore the operators state and add check for the initial destination tables. 2023-04-16 22:48:22 +08:00
Haojun Liao 70b45a4cf0 fix(stream): all data should be extracted from wal. 2023-04-13 23:22:09 +08:00
Haojun Liao a4ba5401f9 enh(stream): set the start version of all operators. 2023-04-11 10:01:36 +08:00
dapan1121 ed4e8313e0 fix: add force stop task and rename conflict structer name 2023-02-16 08:55:13 +08:00
Shengliang Guan e6b4031487 fix: coverity issues 2023-01-12 16:04:57 +08:00
Shengliang Guan cff741e4c4 fix: coverity issues 2023-01-11 16:56:14 +08:00
Shengliang Guan 367b6512e9 fix: heap-buffer-overflow in auto qworker 2022-12-28 17:02:50 +08:00
Shengliang Guan ed98fddf74 enh: adjusting the operation mode of the stream thread pool 2022-12-28 14:37:56 +08:00
Shengliang Guan adb335467c fix: coverity issues 2022-11-05 19:59:18 +08:00
Shengliang Guan 4fc0e3bd55 enh: adjust the number of vnode threads so that one vnode has one write thread 2022-11-04 17:21:00 +08:00
Shengliang Guan fc41f43c9d fix: deadlock while drop db 2022-11-04 16:15:37 +08:00
Shengliang Guan a0983cf8c1 enh: adjust tqueue and tworker log 2022-11-04 10:58:23 +08:00
Shengliang Guan 4e7cac45c0 fix: improve test coverage 2022-10-20 12:33:47 +08:00
Shengliang Guan 34b08b7b71 fix: improve test coverage 2022-10-20 11:27:00 +08:00
Hongze Cheng fcbaa6082b more code refact 2022-10-13 11:49:46 +08:00
Shengliang Guan eead619f1a fix: coverity issues 2022-09-27 17:10:48 +08:00
Shengliang Guan b9165a9503 fix: reset queueSize after the queueItem is consumed and executed by the worker 2022-07-12 13:56:54 +08:00
Shengliang Guan 52b63db905 fix: invalid vnode ref while drop stream 2022-07-12 13:26:55 +08:00
Haojun Liao 5819b616ce fix(query): update the number of query threads. 2022-07-10 16:33:38 +08:00
Shengliang Guan 27c1687a05 refactor: adjust some logs 2022-06-02 14:30:26 +08:00
dapan1121 5ce7dd2a4d qnode load 2022-05-28 22:13:26 +08:00
Shengliang Guan 77575d1e70 refactor: shm queue in multi process mode 2022-05-18 14:20:46 +08:00
Shengliang Guan 1e1573359d shm 2022-03-28 16:43:52 +08:00
afwerar 222db126bc [TD-13758]<fix>: redefine memory api. 2022-03-26 00:29:53 +08:00
Shengliang Guan 2af212f42d refact worker 2022-03-22 16:51:30 +08:00
Shengliang Guan f48fddc7c4 refact queue 2022-03-22 16:47:53 +08:00
Shengliang Guan a340baa879 refact queue 2022-03-22 16:10:26 +08:00
Shengliang Guan 4091771274 refact queue 2022-03-22 14:38:26 +08:00
Shengliang Guan fe8714fe56 refact worker 2022-03-22 10:49:33 +08:00
afwerar 79057240bd [TD-13759]<fix>: redefine thread api. 2022-03-20 00:47:45 +08:00
Liu Jicong 36d4ef0af6 refactor stream worker 2022-03-14 20:32:19 +08:00
Shengliang Guan 4cbfc4f82b minor changes 2022-02-28 14:31:57 +08:00
Shengliang Guan 15b18f4ce9 log 2022-02-27 11:05:46 +08:00
Shengliang Guan 29a49f325c rollback fetch worker 2022-01-26 06:44:54 +00:00
Shengliang Guan 0797879022 dead lock after refact worker 2022-01-25 10:29:47 +00:00
Shengliang Guan 4fc74ced94 refact worker 2022-01-25 09:14:24 +00:00
Shengliang Guan 8685fb79b7 refact worker 2022-01-25 08:40:07 +00:00
Shengliang Guan 5fca9015b8 refact worker util 2022-01-25 08:23:10 +00:00
Shengliang Guan 8789ae7716 set queue to a named type instead of void 2021-12-30 02:33:57 -08:00
Shengliang Guan a9d13928dd fix bug in transaction 2021-12-23 03:59:42 -08:00
Shengliang Guan c049678ade TD-11265 fix deadlock while quit taosd 2021-11-27 15:57:54 +08:00
Shengliang Guan 2f09d49aa4 refact dnode - vnodes 2021-11-04 14:06:29 +08:00
Shengliang Guan 2f36662750 remove mgmt from vnode 2021-11-01 19:49:44 +08:00
Shengliang Guan 139a4c7fb1 adjust tqueue codes 2021-10-29 17:11:15 +08:00
Shengliang Guan 7bcfb460ce minor changes 2021-10-20 09:06:08 +08:00
Shengliang Guan 111bce9eab [TD-10430] add global variables in dnode 2021-10-09 21:29:06 +08:00
Shengliang Guan 8ccd079f6e rename tulog.h ulog.h 2021-10-04 21:01:03 +08:00
Shengliang Guan d20aa8f8f3 [TD-10430] check util and common files 2021-10-04 20:42:53 +08:00
Shengliang Guan c0a171b144 [TD-10430] adjust os module 2021-10-03 10:32:14 +08:00