Commit Graph

1742 Commits

Author SHA1 Message Date
dapan1121 e2d45438cb
Merge pull request #21405 from taosdata/szhou/scl-flt
enhance: scalar filter improvement
2023-05-28 18:49:39 +08:00
Haojun Liao cea8334427
Merge pull request #21449 from taosdata/refact/fillhistory
refactor: remove the module dependency.  TD-24279
2023-05-26 09:01:45 +08:00
slzhou de1848cb08 enhance: use scalar mode to run ci test 2023-05-25 14:51:53 +08:00
Haojun Liao 0966213847 fix(arch): set the correct module api dependency. 2023-05-25 14:21:40 +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
Ganlin Zhao 89bea7100f fix: fix count var type error 2023-05-24 00:31:05 -07:00
Haojun Liao e67b532d8a refactor: refactor the module dependency. 2023-05-23 18:29:23 +08:00
dapan1121 70444e2d82
Merge pull request #21329 from taosdata/feat/TD-21187
feat(query): interp support ignore null value opition
2023-05-20 14:14:21 +08:00
Ganlin Zhao a3ca23b688 forbid interp ignoring null value used for multiple cols 2023-05-19 16:43:39 +08:00
yihaoDeng 9380b22394 merge 3.0 2023-05-18 05:46:38 +00:00
Haojun Liao 041ffa91bd other: merge main. 2023-05-17 15:42:15 +08:00
Ganlin Zhao 6879a784ae reserve value node 2023-05-16 15:07:07 +08:00
Ganlin Zhao ace27326b0 enable ignore_null value param in client 2023-05-16 14:13:40 +08:00
liuyao 502efb3d01 op stream selectivity buff 2023-05-15 16:26:24 +08:00
dapan1121 026a4b5540 fix: fix compile issue 2023-05-12 15:07:05 +08:00
yihaoDeng 5708fcb5cb Merge branch 'enh/3.0' into enh/rocksdbSstateMerge 2023-05-10 08:02:16 +00:00
Yihao Deng c6e5879f44
Merge branch 'main' into enh/rocksdbSstate 2023-05-10 10:04:28 +08:00
yihaoDeng 8356533eb1 Merge branch 'enh/standVer' into enh/rocksdbSstateMerge 2023-05-09 12:13:16 +00:00
wangjiaming0909 479bb157e0 fix: select _block_dist() from t; set the unit of Size to KB 2023-05-09 15:19:21 +08:00
kailixu fa822ff286 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-27 19:11:16 +08:00
Benguang Zhao 12f28a4a43 enh: unify error msg for no disk space 2023-04-25 15:39:11 +08:00
kailixu 781834065a Merge branch '3.0' into enh/TD-21161-3.0 2023-04-25 08:22:08 +08:00
shenglian zhou bb3ce6a3d7 enhance: error code refactor 2023-04-23 14:54:12 +08:00
yihaoDeng 917b07348c Merge branch 'fix/rocksdbState' into enh/rocksRevert 2023-04-23 02:37:26 +00:00
kailixu 77a8e3b213 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-21 16:04:09 +08:00
Alex Duan 4c0cdd8192 test: add udf2_dup test case 2023-04-20 14:34:38 +08:00
Alex Duan c34c53539d test: add udf2_dup test case 2023-04-20 14:32:32 +08:00
Alex Duan 977af4289b test: fix udf1_dup error 2023-04-20 14:05:15 +08:00
Alex Duan ba0a6e087f test: add the cast that select field include two udf function 2023-04-20 13:51:39 +08:00
yihaoDeng 5402a6061f Merge branch 'dev' into enh/rocksRevert 2023-04-19 17:37:07 +08:00
dapan1121 95b78f327a
Merge pull request #20959 from taosdata/enh/TS-3149
enh: add param for to_unixtimestamp to return timestamp type
2023-04-19 08:54:25 +08:00
Ganlin Zhao 9581dcae7f enh: add param for to_unixtimestamp to return timestamp type 2023-04-18 14:17:22 +08:00
kailixu 50053fdc01 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-18 11:13:30 +08:00
shenglian zhou a2d75a327c enhance: udf output column reserve capacity 2023-04-18 08:28:12 +08:00
shenglian zhou 2aefe1d24a Merge branch '3.0' of github.com:taosdata/TDengine into szhou/replace-function-2 2023-04-18 08:24:18 +08:00
kailixu fd3b552357 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-17 11:42:46 +08:00
shenglian zhou 1a0c9f31bc enhance: refactor cleanup udf function 2023-04-17 10:34:34 +08:00
Haojun Liao 04e042f21d Merge branch 'feature/3_liaohj' into enh/rocksRevert 2023-04-15 09:35:43 +08:00
Haojun Liao b57c813681 other: merge feature/3_liaohj 2023-04-14 10:36:54 +08:00
slzhou f62fbde22b Merge branch '3.0' of github.com:taosdata/TDengine into szhou/replace-function-2 2023-04-14 10:26:52 +08:00
dapan1121 d4cb608505
Merge pull request #20885 from taosdata/fix/TS-3108
fix: fix timestamp constant comparison precision error
2023-04-14 09:27:03 +08:00
Xiaoyu Wang 31b2db470b
Merge pull request #20923 from taosdata/fix/3.0_merge_main
merge 3.0
2023-04-14 09:11:51 +08:00
slzhou 99587db7a1 fix: udf handle expired after 10s 2023-04-14 07:58:25 +08:00
Xiaoyu Wang db8a6ce60b
Merge pull request #20891 from taosdata/FIX/TD-23613-main
test: add flush database in some testcases
2023-04-13 19:03:34 +08:00
Xiaoyu Wang d3642c84a2 Merge remote-tracking branch 'origin/3.0' into fix/3.0_merge_main 2023-04-13 16:36:30 +08:00
Ganlin Zhao c7dd22ad1c fix spread timestmap column reading sma issue 2023-04-13 14:58:13 +08:00
Ganlin Zhao d1544e8859 fix: fix illegal usage of _isfilled/_irowts 2023-04-13 14:05:04 +08:00
Ganlin Zhao 7414f28d17 fix translatefunc not getting precision issue 2023-04-13 11:22:15 +08:00
Xiaoyu Wang 933660ae8d Merge remote-tracking branch 'origin/main' into fix/3.0_merge_main 2023-04-12 14:13:23 +08:00
kailixu 04fa4d2e87 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-12 13:05:47 +08:00
shenglian zhou fe718f60ee fix: add expired udfc func stub to track the expired 2023-04-12 12:15:09 +08:00
shenglian zhou 33143e90c8 enhance: add udf stub expiration of 10s after creation 2023-04-12 09:17:31 +08:00
yihaoDeng b24b91886a Merge branch 'dev3' into enh/rocksRevert 2023-04-11 10:59:00 +00:00
Xiaoyu Wang 5ce6220106
Merge pull request #20781 from taosdata/szhou/replace-function
feature: udf replace function
2023-04-11 17:25:21 +08:00
Minglei Jin 9961f82479 fix(udf1): use 1 as luck number to make new gcc happy 2023-04-11 16:52:56 +08:00
slzhou 41f7d79f2c fix: fix compilation error 2023-04-11 13:42:17 +08:00
shenglian zhou 74f2ba76a4 fix: check uv_is_closing before uv_close 2023-04-11 13:24:20 +08:00
Minglei Jin 8060e77be3 fix(udf): make strncat working for release building 2023-04-11 10:41:35 +08:00
Ganlin Zhao 3078e2d487 feat(query): INTERP support boolean type 2023-04-10 18:35:35 +08:00
slzhou b725c9e192 enhance: change udf func body dir to tsDataDir/.udf 2023-04-09 20:31:25 +08:00
slzhou dc86bf9671 fix: remove code size checking 2023-04-08 13:26:15 +08:00
slzhou 55ffb0bc6d fix: correct udf body file name and correct createdtime 2023-04-08 11:36:09 +08:00
shenglian zhou 0be6bb735a fix: remove rename file 2023-04-08 10:42:27 +08:00
shenglian zhou 32523d72f9 fix: add created time to file name and keep file reuse 2023-04-08 10:11:57 +08:00
kailixu e976fcb91d Merge branch '3.0' into enh/TD-21161-3.0 2023-04-07 17:51:35 +08:00
slzhou 26f1e91ddb fix: change binarylib/script dir to tsdatadir 2023-04-07 16:12:29 +08:00
slzhou 596764479f fix: no more fetch when it is already fetching 2023-04-07 10:30:36 +08:00
shenglian zhou 455719befa fix: use us time unit for last fetch time 2023-04-06 18:09:29 +08:00
shenglian zhou 0b055470ec fix: free pFuncVersions of SRetrieveFuncRsp 2023-04-06 14:42:16 +08:00
shenglian zhou e71a82347b enhance: refactor c plugin udf init 2023-04-06 14:31:11 +08:00
slzhou 8ab1aa4ac9 fix: change bugs related to expired udf 2023-04-06 13:13:54 +08:00
slzhou adec92b0b2 fix: change a minor bug 2023-04-06 11:37:48 +08:00
shenglian zhou 47719b1028 Merge branch '2.0' of github.com:taosdata/TDengine into szhou/replace-function 2023-04-06 11:19:10 +08:00
shenglian zhou c17d9eca5f fix: add fetchtime and version to udf init 2023-04-06 11:18:30 +08:00
Xiaoyu Wang c134432c45 merge main 2023-04-06 09:31:45 +08:00
Xiaoyu Wang e9d7a099cc merge main 2023-04-04 14:50:58 +08:00
Ganlin Zhao 4819b22a21 fix: fix tsim crash on windows due to invalid input to strftime 2023-04-04 13:40:53 +08:00
Ganlin Zhao 23ec9287c9 fix: fix tsim crash on windows due to invalid input to strftime 2023-04-04 10:33:41 +08:00
Xiaoyu Wang 16394862a6 enh: last_row is keep order function 2023-04-03 18:11:46 +08:00
Ganlin Zhao 6c64b760a0 fix: fix tsim crash on windows due to invalid input to strftime 2023-04-03 17:58:43 +08:00
kailixu 37bc1bca36 enh: column/row max length support up to 64K 2023-04-03 17:00:52 +08:00
dapan1121 24ed3458d9
Merge pull request #20715 from taosdata/fix/TD-23394-a
fix(query): fix group_key is processed in selectivity twice
2023-03-31 09:04:45 +08:00
dapan1121 e3b4e9bf0b
Merge pull request #20714 from taosdata/fix/TS-3037
fix: join query invalid time input issue
2023-03-31 08:53:32 +08:00
Ganlin Zhao 7e30f8619c fix(query): fix group_key is processed in selectivity twice 2023-03-30 18:42:22 +08:00
dapan1121 a8da9f31e7 fix: join query error 2023-03-30 18:04:32 +08:00
shenglian zhou 23d4eef114 feat: startup of replace function when no active query 2023-03-30 11:46:40 +08:00
dapan1121 9952be43f6 Merge remote-tracking branch 'origin/main' into fix/cencVer 2023-03-29 15:50:14 +08:00
dapan1121 5f68b65675 fix: count elements number type issue 2023-03-29 11:20:37 +08:00
Haojun Liao 1093c64586
Merge pull request #20649 from taosdata/fix/TD-23272
fix:add combine function for last row
2023-03-29 10:43:49 +08:00
slzhou 169d0ee13c fix: scalar return and log error of udf execution 2023-03-28 11:18:14 +08:00
Ganlin Zhao 2198ae2060 fix(query): spread/elapsed using sma result for computation 2023-03-28 10:49:49 +08:00
54liuyao 3a12e36b4b fix:add combine function for last row 2023-03-27 14:13:17 +08:00
yihaoDeng 8e409f81ae add backend 2023-03-25 06:43:17 +00:00
dapan1121 95dd3e078a
Merge pull request #20596 from taosdata/szhou/python-udf
fix: aggregate function can return null value
2023-03-25 08:57:33 +08:00
54liuyao ffa59f69aa fix:add combine function for groupKey 2023-03-23 15:20:45 +08:00
dapan1121 5b02af6a91 fix: merge main to 3.0 2023-03-22 16:08:16 +08:00
shenglian zhou 7db1c08d9d fix: merge during pull 2023-03-22 15:28:37 +08:00
shenglian zhou 0c0edd6a39 fix: udf agg can not return null values 2023-03-22 15:27:11 +08:00
Ganlin Zhao 9e0faad5eb remove unused MACROS 2023-03-21 16:24:20 +08:00
Ganlin Zhao e9fa00185a enh(query): improve mode function page buffer allocation 2023-03-21 16:15:26 +08:00