Commit Graph

106 Commits

Author SHA1 Message Date
wangjiaming0909 1f71ce9409 feature: get last timestamp before create sma index 2023-07-06 10:33:22 +08:00
dapan1121 170182fecd feat: support fill history with sub request 2023-06-12 16:10:54 +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
Xiaoyu Wang 115160bbd0 fix: insert syntax error 2023-02-05 10:11:26 +08:00
Xiaoyu Wang 8513dc1067 enh: insert optimize 2022-11-04 15:21:38 +08:00
Xiaoyu Wang 0563eb2475 feat: support batch loading of csv files 2022-10-11 17:28:58 +08:00
Xiaoyu Wang 18fa48ae57 feat: support batch loading of csv files 2022-10-11 15:54:01 +08:00
Xiaoyu Wang 876303be56 enh: added memory allocators for parser and planner 2022-09-21 17:42:03 +08:00
Xiaoyu Wang 5116e0a01b enh: added memory allocators for parser and planner 2022-09-21 17:04:12 +08:00
dapan1121 205299e532 fix: fix taosd stmt query crash issue 2022-08-29 17:46:34 +08:00
Xiaoyu Wang 4290582249 enh: insert optimize 2022-08-10 17:47:28 +08:00
Xiaoyu Wang 8fc86a31d0 enh: asynchronous catalog interface optimization 2022-08-04 20:53:43 +08:00
Xiaoyu Wang dad14a28c9 merge 3.0 2022-07-21 19:24:14 +08:00
Xiaoyu Wang c54daccf2d fix: plan problem caused by project eliminate optimize 2022-07-21 14:35:36 +08:00
Xiaoyu Wang 37ec05a715 fix: memory leak problems of parser and planner 2022-07-20 17:20:29 +08:00
dapan1121 1444054437 fix: fix stmt memory leak 2022-07-18 18:57:47 +08:00
Xiaoyu Wang 6a845b746c fix: some problems of parser 2022-07-11 15:15:39 +08:00
Xiaoyu Wang 72738040a9 fix: some problem of parser and planner 2022-07-10 16:44:50 +08:00
dapan1121 f3c8bcb953 feat: insert from query 2022-07-07 09:42:20 +08:00
Xiaoyu Wang 331dca1f58 feat: sql command 'insert ... select' 2022-07-06 10:02:20 +08:00
Xiaoyu Wang c8508248e2 feat: sql command 'insert ... select' 2022-07-05 21:12:10 +08:00
Xiaoyu Wang 1676bfe5cf fix: some problems of parser 2022-06-14 15:43:56 +08:00
Xiaoyu Wang 380a071551 fix: handle the memory leak of parser 2022-06-13 14:54:38 +08:00
Xiaoyu Wang d1e0327d19 fix: handle the memory leak of parser 2022-06-11 21:32:29 +08:00
dapan1121 6aece12755 fix parser stack overflow issue 2022-06-01 14:39:40 +08:00
Xiaoyu Wang 06baa86145 feat: parser of insert statement adapts asynchronous interface 2022-05-30 17:01:44 +08:00
dapan1121 5da1ead67b
Merge pull request #13174 from taosdata/feature/qnode
fix: fix memory leak
2022-05-28 22:44:00 +08:00
Xiaoyu Wang b5db96b717 feat: parser adapts asynchronous interface 2022-05-28 15:11:37 +08:00
dapan1121 996a041cb2 fix stmt bind binary/nchar issue 2022-05-28 13:30:35 +08:00
Xiaoyu Wang 0a3c741ffe feat: parser adapts asynchronous interface 2022-05-27 17:46:21 +08:00
Xiaoyu Wang 1005fb8850 feat: parser adapts asynchronous interface 2022-05-27 17:02:40 +08:00
Xiaoyu Wang d0c11c5bba feat: parser adapts asynchronous interface 2022-05-27 17:00:37 +08:00
Xiaoyu Wang 7989190b5e fix: some problems of rollup sma 2022-05-26 14:16:36 +08:00
Xiaoyu Wang 8eadd68218 fix: some problems of parser for stmt mode 2022-05-17 20:08:13 +08:00
Xiaoyu Wang c9428fca0e fix: some problems of parser for stmt mode 2022-05-17 18:52:51 +08:00
Xiaoyu Wang fb901d95e4 fix: some problems of parser for stmt mode 2022-05-17 11:11:40 +08:00
dapan1121 ce3b4b3183 stmt query 2022-05-13 16:35:19 +08:00
Xiaoyu Wang b57f62f139 feat: adjust query stmt APIs 2022-05-12 20:33:52 +08:00
Xiaoyu Wang 6e50691b29 feat: sql command 'grant', 'revoke', 'kill transaction' and 'show transactions' 2022-05-07 17:37:17 +08:00
Xiaoyu Wang ac874f9e8d enh: format code 2022-04-26 11:50:35 +08:00
afwerar fc24521621 fix(os): windows compile 3.0. 2022-04-22 09:54:27 +08:00
dapan1121 b77731702e stmt 2022-04-20 18:27:00 +08:00
dapan1121 93ca1168f3 stmt 2022-04-16 19:41:18 +08:00
dapan1121 1c499c94a7 stmt 2022-04-16 17:47:42 +08:00
dapan1121 9547c0a09b stmt 2022-04-16 15:59:19 +08:00
dapan1121 e3ea173046 stmt 2022-04-15 20:10:51 +08:00
dapan1121 69f09fd0e3 stmt 2022-04-14 20:14:52 +08:00
Xiaoyu Wang 469cd23f43 integrate constant calculate 2022-04-02 07:57:44 -04:00
Xiaoyu Wang ba80c7478f TD-14405 TD-14404 desc and reset query cache statement implement 2022-03-31 02:19:11 -04:00
Xiaoyu Wang 9f93b1ebc6 TD-14281 deal memory leak 2022-03-29 08:14:46 -04:00