Commit Graph

184 Commits

Author SHA1 Message Date
yihaoDeng d28a450882 add coveriry 2024-02-21 14:39:41 +08:00
yihaoDeng d0b26bf037 add coveriry 2024-02-21 14:07:46 +08:00
factosea d25275713e ctest 2023-12-12 13:59:56 +08:00
facetosea 33897447cb ctest on linux exclude 2023-12-12 10:37:39 +08:00
facetosea 759a5d4bbf fix ctest 2023-10-26 21:06:08 +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 22aa03307c fix(query): fix syntax errors on centos. 2023-02-24 11:38:54 +08:00
dapan1121 978d45ffc1 enh: optimize converting timestamp at client side 2022-12-15 16:56:35 +08:00
Haojun Liao 6e81e8cc73 refactor: do some internal refactor. 2022-11-28 12:32:40 +08:00
Haojun Liao 8bf01cdecb fix(query): fix error in unit test. 2022-11-05 00:02:25 +08:00
Hongze Cheng 63d9b85631 more code format 2022-10-13 13:59:18 +08:00
yihaoDeng 636004199b fix(idx): fix index read crash 2022-09-27 21:32:18 +08:00
yihaoDeng fb3c849141 fix: fix compile error 2022-09-11 23:01:37 +08:00
yihaoDeng ecfaf229e3 fix: add bench 2022-09-09 13:55:16 +08:00
yihaoDeng f6eda114bd fix(rpc): handle write failure 2022-09-09 11:32:13 +08:00
yihaoDeng 349dd69f94 fix compile error 2022-09-08 22:50:50 +08:00
yihaoDeng ee7a18db29 fix: add bench 2022-09-08 20:25:56 +08:00
yihaoDeng f0c1950b63 refactor code 2022-09-07 19:39:44 +08:00
yihaoDeng ca7ca2f1e3 refactor code 2022-07-14 19:23:01 +08:00
yihaoDeng a9e64f2938 feat: add lru to index 2022-07-14 15:17:05 +08:00
yihaoDeng cace9b6be9 feat: add lru to index 2022-07-14 14:51:39 +08:00
yihaoDeng 06fe7f6a5a update test case 2022-07-10 16:17:42 +08:00
yihaoDeng f52038dbfc add test case 2022-07-10 11:35:24 +08:00
yihaoDeng 578343bee8 add test case 2022-07-08 21:08:47 +08:00
yihaoDeng c8573045f6 add test case 2022-07-08 20:59:37 +08:00
yihaoDeng 2cf01e0782 add test case 2022-07-08 20:50:11 +08:00
afwerar 98641a8ff5 test: fix Mac test error 2022-07-06 20:47:38 +08:00
yihaoDeng 4b0e8a3919 feat: refactor index code 2022-06-30 20:00:46 +08:00
Haojun Liao 14ddf539e0 refactor(query): do some internal refactor. 2022-06-22 17:21:04 +08:00
yihaoDeng eab330c092 enh: refactor index code 2022-06-09 15:14:11 +08:00
yihaoDeng d9c83f6357 enh: change rpcGetConnInfo 2022-06-09 13:50:18 +08:00
yihaoDeng 485707b1cd refactor idx code 2022-06-08 22:40:05 +08:00
yihaoDeng dcc78597bf refactor index code 2022-06-08 21:51:28 +08:00
yihaoDeng 1f5ad0f1ec enh: index support between 2022-06-08 18:29:51 +08:00
yihaoDeng 7e5dd50235 fix: add col type 2022-06-08 13:21:07 +08:00
yihaoDeng fb389ab826 fix: avoid filter failure 2022-06-07 21:43:30 +08:00
yihaoDeng 16f8450bbc update test case 2022-06-05 19:44:44 +08:00
afwerar 490889f8e7 fix(os): win python case error 2022-06-03 16:13:06 +08:00
yihaoDeng e7fe3577e5 enh: refactor index/trans 2022-06-01 14:30:01 +08:00
afwerar fac9e44839 fix(os): reduce ctest case 2022-05-28 22:35:45 +08:00
afwerar 7b540d91d9 fix(os): add win ctest 2022-05-28 21:08:50 +08:00
yihaoDeng ddab675207 set default idx 2022-05-28 19:41:36 +08:00
yihaoDeng 0b0253f2d1 enh: support tag filter 2022-05-28 17:30:44 +08:00
yihaoDeng 6acbe7e777 enh: support tag filter 2022-05-28 16:15:24 +08:00
yihaoDeng d067104ec1 fix: index memory error 2022-05-25 20:38:25 +08:00
yihaoDeng 8ef6eb4c5f enh: refactor index code 2022-05-24 15:17:14 +08:00
yihaoDeng 6ca5e3ae6e enh: opt index mutex 2022-05-24 13:50:33 +08:00
yihaoDeng ee92f8c584 Merge branch 'nd' into 3.0 2022-05-23 22:39:56 +08:00
yihaoDeng f0da893bfb fix: avoid multi thread read/write crash 2022-05-23 21:59:47 +08:00
yihaoDeng 7da509b2f2 enh: index filter interface 2022-05-23 17:31:36 +08:00