Commit Graph

118 Commits

Author SHA1 Message Date
Haojun Liao 5301c5756a other: merge main into 3.0. 2023-06-01 09:29:18 +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 1e020a46c9 other: merge main. 2023-05-19 09:07:35 +08:00
Haojun Liao da0d9c78ef refactor: do some internal refactor. 2023-04-28 11:42:34 +08:00
Haojun Liao 7adc21028a refactor: do some internal refactor. 2023-04-28 00:23:38 +08:00
Haojun Liao 8d187efc18 refactor:do some internal refactor. 2023-02-20 10:04:08 +08:00
Haojun Liao a488f31ba9 refactor:do some internal refactor. 2023-02-20 09:52:11 +08:00
Haojun Liao 579b1b0a6c fix(query): check correct unit. 2023-02-19 15:12:19 +08:00
Haojun Liao 9b90416bf3 test: add unit test case. 2023-02-17 18:38:08 +08:00
54liuyao 4c6702ab73 fix:modify parameter type 2022-12-30 13:29:29 +08:00
Haojun Liao 8b1f452312 fix(query): set data load flag for multi-way merge . 2022-12-13 22:37:29 +08:00
Hongze Cheng d5255f1eb7 more format 2022-10-13 13:41:36 +08:00
Cary Xu 4abb6e1411 enh: use simple hash to save agg result 2022-08-26 16:52:12 +08:00
Haojun Liao 033b251994 test: update the unit test cases. 2022-08-24 18:48:03 +08:00
Cary Xu ae7550eb86 enh: rsma exec in async mode 2022-08-12 21:00:48 +08:00
Cary Xu 133beb4d49 other: make test case pass 2022-08-11 19:18:55 +08:00
Cary Xu e890bcc6f4 enh: tsimplehash remove/iter/ut 2022-08-11 19:12:24 +08:00
Shengliang Guan a5e8ddbc56 refactor: adjust logs 2022-07-08 18:00:19 +08:00
afwerar 98641a8ff5 test: fix Mac test error 2022-07-06 20:47:38 +08:00
Haojun Liao 14ddf539e0 refactor(query): do some internal refactor. 2022-06-22 17:21:04 +08:00
Haojun Liao 78d1f75c9b refactor(query): do some internal refactor. 2022-06-17 19:01:45 +08:00
Haojun Liao 102fdf2916 fix(query): fix the syntax error in unit test. 2022-06-16 11:52:58 +08:00
yihaoDeng 7da509b2f2 enh: index filter interface 2022-05-23 17:31:36 +08:00
afwerar 5acf419019 fix(os): win not close file ctest error 2022-05-21 23:47:39 +08:00
Haojun Liao 00821527be fix(query): specify the primary timestamp column in ssdatablock when update the time range of ssdatablock. 2022-05-21 11:02:53 +08:00
yihaoDeng 70171a66e0 enh(index): fix sanitizer error 2022-05-14 20:53:40 +08:00
yihaoDeng d003f1b0d7 enh(index): add more UT 2022-05-13 23:30:46 +08:00
yihaoDeng 7f7b1a423a fix(rpc): avoid fd leak 2022-05-12 12:10:22 +08:00
yihaoDeng f3bf12c711 enh(index): update index filter UT 2022-05-11 23:20:01 +08:00
yihaoDeng 19e7f2207b enh(index): update index filter UT 2022-05-11 22:41:03 +08:00
yihaoDeng b6c637dc64 enh(index): update index filter UT 2022-05-11 22:13:46 +08:00
yihaoDeng 9882ae0a21 enh(index): update index filter UT 2022-05-11 22:11:33 +08:00
yihaoDeng d4c550db66 enh(query): add executor plan interface 2022-05-10 21:35:43 +08:00
Haojun Liao 8954035a2c fix(query): update the unit test cases. 2022-05-05 19:05:55 +08:00
Haojun Liao 3438ed13f3 refactor: do some internal refactor. 2022-05-03 15:27:13 +08:00
Haojun Liao c71c88a719 enh(query): enable check sma status for each column in query. 2022-04-29 20:07:33 +08:00
Haojun Liao c0b7b1302b refactor: do some internal refactor. 2022-04-27 09:27:12 +08:00
Hongze Cheng 588fd84853 refact meta 2022-04-24 06:19:12 +00:00
afwerar fc24521621 fix(os): windows compile 3.0. 2022-04-22 09:54:27 +08:00
afwerar dea51ba364 fix(build): use static taos lib. 2022-04-16 20:46:51 +08:00
afwerar 2662a3b69d [TD-13254]<fix>: make 3.0 grant. 2022-04-10 19:08:16 +08:00
wangmm0220 1f8d2ea446 <fix>: fix index map error from table scan to sort output 2022-04-08 14:17:32 +08:00
wangmm0220 288b50aef2 fix error in sort logic 2022-04-06 19:53:17 +08:00
wangmm0220 aced34c438 fix error in sort operation 2022-04-06 18:30:25 +08:00
wangmm0220 4bc0e507da modify test case 2022-04-06 17:10:51 +08:00
wangmm0220 f72c983792 modify test case 2022-04-06 16:56:13 +08:00
wangmm0220 865a13c1c2 fix error in sort logic 2022-04-06 16:46:26 +08:00
wangmm0220 78acaed84e fix error in sort logic 2022-04-06 15:44:14 +08:00
wangmm0220 9b66bb1682 optimize sort logic & fix memory leak 2022-04-06 14:32:07 +08:00
wangmm0220 ff21ecd364 optimize sort logic & fix memory leak 2022-04-06 11:43:17 +08:00