Commit Graph

83 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
Shengliang Guan b9f95b6a12
Merge pull request #19390 from taosdata/merge/mainto3.0_0105
merge from main to 3.0
2023-01-06 08:59:32 +08:00
Ganlin Zhao a2cc08145a fix: fix coverity issues 2023-01-05 14:11:05 +08:00
Ganlin Zhao 4b81962269 fix asserts 2023-01-04 09:16:00 +08:00
Shengliang Guan 1bb1025f7d enh: add tassert 2022-12-07 22:24:47 +08:00
Shengliang Guan 6d94afe48f
Revert "refact: adjust some assert cases" 2022-12-07 21:51:17 +08:00
Shengliang Guan d5126d469a refact: replcase ASSERT with tAssert 2022-12-07 18:42:48 +08:00
Shengliang Guan f69a188f7e refact: replcase ASSERT with tAssert 2022-12-07 18:37:40 +08:00
Shengliang Guan 335a572d86
Revert "Revert "enh: row optimize2"" 2022-11-24 10:12:25 +08:00
Hongze Cheng ffbb04d40a
Revert "enh: row optimize2" 2022-11-24 09:21:26 +08:00
Shengliang Guan ba62164767
Merge pull request #18396 from taosdata/enh/row_optimize2
enh: row optimize2
2022-11-24 00:30:48 +08:00
Ganlin Zhao 793070acba fix: [ASAN] null pointer in trow.c 2022-11-23 20:54:14 +08:00
kailixu 7efb33110d chore: revert the code change 2022-11-23 16:58:57 +08:00
kailixu ab77f8a37d chore: row offset adaption to exclude TSKEY 2022-11-23 16:57:18 +08:00
Hongze Cheng df5bcae11b more code 2022-11-23 15:45:19 +08:00
Hongze Cheng 7bba9996cf perf: optimize insert 2022-11-08 14:36:18 +08:00
Haojun Liao d200fe5145 refactor: do some internal refactor. 2022-11-06 01:34:04 +08:00
Cary Xu 8e22c89136 fix: coverity scan problem for trow 2022-10-30 12:45:55 +08:00
Cary Xu 951d110b3b fix: coverity scan for trow 2022-10-20 09:31:17 +08:00
Haojun Liao 1795163999 refactor: remove redundant codes. 2022-10-19 18:06:09 +08:00
Hongze Cheng 1a0dcddd62 Merge branch 'enh/cv_optimize' of https://github.com/taosdata/TDengine into feat/stream_compression 2022-09-23 18:59:13 +08:00
Hongze Cheng f0fea204f2 enh: col value optimize 2022-09-23 18:55:27 +08:00
Hongze Cheng f8619dfbe8 refact code for further refact 2022-09-21 15:28:04 +08:00
Cary Xu f78c61aac6 refactor: rsma fetch trigger refactor and use ref to manage qtaskf 2022-09-04 14:54:33 +08:00
Cary Xu 446b3291e7 fix: remove obsolete code 2022-08-11 09:53:51 +08:00
Cary Xu a5ef854e87 row: code optimization 2022-08-11 07:45:49 +08:00
Cary Xu cfb61d665d fix: row iter 2022-08-10 20:44:48 +08:00
Cary Xu 1d6d0aa2db enh: row iter and fetch optimization 2022-08-10 17:26:44 +08:00
Cary Xu 846ee63c88 enh: normal val optimization 2022-08-03 16:47:41 +08:00
Cary Xu 843a516919 enh: get normal val from tp row 2022-08-03 16:44:23 +08:00
Cary Xu 258448bae9 fix: get normal val from tp row 2022-08-03 16:42:08 +08:00
Cary Xu 22512c0922 enh: row optimization 2022-08-03 16:33:53 +08:00
Cary Xu 2b06d8328c enh: row end optimization 2022-08-03 16:27:50 +08:00
Cary Xu 0c4454c077 fix: set statis to 0 when all col is normal 2022-08-03 16:23:27 +08:00
Cary Xu a3166507a5 enh: don't read bitmap when all col is normal 2022-08-03 15:58:28 +08:00
Cary Xu 87c6f5805e fix: add and adapt cases for merge dup rows in taosc 2022-07-21 17:11:13 +08:00
Cary Xu 65871c2d73 Merge branch '3.0' into feature/TD-11274-3.0 2022-07-21 09:44:20 +08:00
Cary Xu e39f2e5ce9 fix: the calculation of max row length 2022-07-20 21:32:28 +08:00
Cary Xu 0f5983ad88 fix: merge dup rows in client 2022-07-20 20:30:54 +08:00
Hongze Cheng 34e5bad70b refact row 2022-07-11 11:43:16 +00:00
Cary Xu 2fbc6a5343 other: enable kv row 2022-07-06 10:30:23 +08:00
Cary Xu 3091f111b7 other: use tp row 2022-07-06 09:13:24 +08:00
Cary Xu ef7a25fdc3 fix: fix the var data len 2022-07-02 16:01:19 +08:00
Cary Xu 576777a63c fix: fix the var data len 2022-07-02 15:57:25 +08:00
Minglei Jin d262ca1b81 trow/STSRow: new ts row from array of colvals 2022-06-27 20:32:11 +08:00
Hongze Cheng 5d2491de52 more work 2022-06-22 09:28:59 +00:00
Cary Xu 5fa27b27ba fix: support fetching specific schema version from table 2022-05-30 19:52:06 +08:00
Cary Xu ff0ab5d7f3 fix: use right idx for kvrow 2022-05-28 08:31:35 +08:00
Cary Xu f63552c213 fix: use bound index instead of colid in case of alter schema 2022-05-23 15:25:01 +08:00
Cary Xu f4aaf791fb fix: check commit and merge and add cases 2022-05-22 19:37:32 +08:00