Commit Graph

22 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 02ec67ad9e
Merge pull request #20882 from taosdata/fix/TS-3081
fix:open test cases for tmq & add log if rebalance error
2023-04-14 17:56:58 +08:00
wangmm0220 e985f15cf0 fix:memset nullBitmap of SSDataBlock to 0 in udf 2023-04-14 09:36:36 +08:00
shenglian zhou 32523d72f9 fix: add created time to file name and keep file reuse 2023-04-08 10:11:57 +08:00
shenglian zhou c17d9eca5f fix: add fetchtime and version to udf init 2023-04-06 11:18:30 +08:00
slzhou 89d05296d8 fix: add varchar/nchar udf support 2023-03-10 14:56:35 +08:00
slzhou c10e32eb6a fix: null bitmap error 2023-03-09 20:27:08 +08:00
slzhou 2b566dabc7 fix: add function not implemented error 2023-03-01 15:37:08 +08:00
slzhou 029444e1c2 fix: use const for name and path in SScriptUdfInfo 2023-02-28 10:39:08 +08:00
slzhou c93cbc96f4 fix: change script env item key and value to const char* 2023-02-27 15:03:30 +08:00
slzhou df5b0babc4 fix: array[0] not supported in windows 2023-02-24 12:20:55 +08:00
slzhou 4ef6dd9e74 fix:will deprecated SUdfInterBuf.numOfResult 2023-02-23 21:10:52 +08:00
slzhou 898bd0ed33 feat: script open function accept env item 2023-02-21 21:24:09 +08:00
slzhou 8e5dae3970 fix: change script udf info structure 2023-02-21 17:09:26 +08:00
slzhou 6b09b72a63 fix: make udfinfo temporary 2023-02-14 17:14:41 +08:00
slzhou 5226473405 feature: udf dispatch first by script type then by udf name 2023-02-06 18:33:54 +08:00
shenglian zhou 220709c9ae fix: fix compiler warning in taosudf.h 2022-12-05 10:14:00 +08:00
dapan1121 c0463e46c9 fix: truncate show create table result 2022-11-14 15:48:01 +08:00
dapan1121 a5b1cfc9a2 fix: extend show create table result width 2022-11-14 11:27:38 +08:00
Hongze Cheng 4cc94968ee refact: format header file 2022-10-13 11:09:43 +08:00
slzhou f3890f7421 feat: support udf merge in udfd 2022-08-26 14:27:15 +08:00
slzhou 9540d1eac9 feat: udf can be compiled outside TDengine 2022-06-28 11:54:16 +08:00