Commit Graph

349 Commits

Author SHA1 Message Date
yihaoDeng 74d5f02969 fix invalid free 2023-06-05 04:56:07 +00:00
yihaoDeng 479a117266 Merge branch 'enh/dev3.0' into enh/addCompileError 2023-05-26 13:03:47 +00: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
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
Haojun Liao 041ffa91bd other: merge main. 2023-05-17 15:42:15 +08:00
dapan1121 0dd0b16842 enh: optimize table scan for last query 2023-05-12 13:30:17 +08:00
kailixu 50053fdc01 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-18 11:13:30 +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
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
Ganlin Zhao 7414f28d17 fix translatefunc not getting precision issue 2023-04-13 11:22:15 +08:00
kailixu 04fa4d2e87 Merge branch '3.0' into enh/TD-21161-3.0 2023-04-12 13:05:47 +08: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
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
shenglian zhou c17d9eca5f fix: add fetchtime and version to udf init 2023-04-06 11:18:30 +08:00
Xiaoyu Wang e9d7a099cc merge main 2023-04-04 14:50:58 +08:00
kailixu 37bc1bca36 enh: column/row max length support up to 64K 2023-04-03 17:00:52 +08:00
dapan1121 5f68b65675 fix: count elements number type issue 2023-03-29 11:20:37 +08:00
54liuyao ffa59f69aa fix:add combine function for groupKey 2023-03-23 15:20:45 +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 7ec5a5df3a Merge branch '3.0' of github.com:taosdata/TDengine into szhou/python-udf 2023-02-23 14:44:14 +08:00
dapan1121 05c7bc170e
Merge pull request #20098 from taosdata/feat/TS-2671
feat(query): optimize percentile function performance
2023-02-23 10:24:06 +08:00
Ganlin Zhao 9102c7a42a change repeat_scan to pre_scan 2023-02-22 10:22:10 +08:00
Ganlin Zhao 61de3b179a Revert "add stats"
This reverts commit 09ce818223.
2023-02-22 10:04:28 +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
Ganlin Zhao 09ce818223 add stats 2023-02-20 19:35:06 +08:00
Xiaoyu Wang c597de099f merge main 2023-02-20 13:41:27 +08:00
slzhou 6b09b72a63 fix: make udfinfo temporary 2023-02-14 17:14:41 +08:00
zlv 45d42d8b1d Merge branch '3.0' of github.com:taosdata/TDengine into szhou/python-udf 2023-02-13 13:29:00 +08:00
Xiaoyu Wang 09925437e3 merge main 2023-02-08 09:51:52 +08:00
slzhou 5226473405 feature: udf dispatch first by script type then by udf name 2023-02-06 18:33:54 +08:00
Haojun Liao 3822225231 other: merge main. 2023-02-06 16:24:15 +08:00
Haojun Liao 0030c4b5ee refactor(query): opt perf by remove some functions. 2023-02-03 14:24:00 +08:00
Haojun Liao 645c45a274 refactor(query): opt perf by remove some functions. 2023-02-03 10:28:12 +08:00
shenglian zhou 3f577c5019 fix: show table distributed only works on super table, child table, and normal table 2023-02-02 11:57:22 +08:00
Haojun Liao 9dd07cc1e1 other:merge main. 2023-01-06 12:54:26 +08:00
Haojun Liao 44e103a6a9 enh(query): remove unnecessary malloc. 2023-01-05 09:38:01 +08:00
Xiaoyu Wang fdde287ca9 merge main 2023-01-04 11:43:20 +08:00
Alex Duan 2439c345d9 enh: clear assert remove tbuffer.h 2022-12-30 18:04:54 +08:00
Liu Jicong 7721353b6b enh: put func state into tdb 2022-12-29 12:39:07 +08:00
Ganlin Zhao 5da2fe9bc5 feat(query): add _isfilled pseudocolumn to indicate data is origin
or filled.
2022-12-14 16:56:10 +08:00
shenglian zhou 220709c9ae fix: fix compiler warning in taosudf.h 2022-12-05 10:14:00 +08:00
Shengliang Guan 6d70f48802
Merge pull request #18592 from taosdata/feature/3_liaohj
enh(query): optimize query perf.
2022-12-02 21:00:35 +08:00
Haojun Liao 4fef284cfe refactor: do some internal refactor. 2022-11-30 21:26:27 +08:00
slzhou 323e52b8c5 Merge branch 'enh/3.0_planner_optimize' into szhou/table-count-scan 2022-11-30 15:43:41 +08:00
Xiaoyu Wang cfbcf92c1f Merge remote-tracking branch 'origin/3.0' into enh/3.0_planner_optimize 2022-11-30 14:29:34 +08:00
slzhou 6d86fb5b51 Merge branch 'enh/3.0_planner_optimize' into szhou/table-count-scan 2022-11-29 22:19:36 +08:00
Xiaoyu Wang 555f2cb981 merge 3.0 2022-11-29 13:16:54 +08:00
Ganlin Zhao 8fba0b631c Merge branch '3.0' into fix/TS-2149 2022-11-28 01:02:57 +08:00
Ganlin Zhao ab86b6ba47 fix hyperloglog bugs 2022-11-28 00:30:39 +08:00
Haojun Liao 9a208b2d09 other: merge 3.0 2022-11-24 17:08:15 +08:00
shenglian zhou 7f6ff39648 feat: table merge scan save work 2022-11-23 19:47:24 +08:00
Xiaoyu Wang 6a50e9e271 Merge remote-tracking branch 'origin/3.0' into enh/3.0_planner_optimize 2022-11-16 10:58:06 +08:00
Xiaoyu Wang 40c7562470 enh: optimize statement for querying the number of sub tables of the super table 2022-11-15 16:38:51 +08:00
dapan1121 c0463e46c9 fix: truncate show create table result 2022-11-14 15:48:01 +08:00
Haojun Liao c888cbf068 refactor: do some internal refactor. 2022-11-14 14:14:24 +08:00
dapan1121 a5b1cfc9a2 fix: extend show create table result width 2022-11-14 11:27:38 +08:00
Haojun Liao 03f4918b3b refactor: do some internal refactor. 2022-11-04 18:46:48 +08:00
Xiaoyu Wang 1b179f65b2 fix: interp _irowts error 2022-11-01 13:34:10 +08:00
Xiaoyu Wang 0228caaa0d enh: last cache optimize 2022-10-18 11:38:59 +08:00
Hongze Cheng 4cc94968ee refact: format header file 2022-10-13 11:09:43 +08:00
Haojun Liao 68842b9c64 refactor: do some internal refactor. 2022-10-10 14:55:58 +08:00
Xiaoyu Wang 73642ac3a2 feat: sql command 'show table tags from table_name' 2022-09-29 16:16:49 +08:00
Xiaoyu Wang 8caa36299c feat: add the _irowts pseudo column to output the timestamp of the interp 2022-09-27 15:23:24 +08:00
Haojun Liao 33c075542d refactor(query): do some internal refactor. 2022-09-21 10:26:55 +08:00
Liu Jicong 4c6a8bbc95 feat(stream): stream state support tuple 2022-09-14 16:50:42 +08:00
Xiaoyu Wang 2ccc7471af enh: query get dbcfg optimization 2022-08-31 11:36:59 +08:00
Haojun Liao 37618513a6
Merge branch '3.0' into feature/3_liaohj 2022-08-29 22:47:18 +08:00
Haojun Liao ba8b10e27b refactor(query): do some internal refactor. 2022-08-29 18:47:46 +08:00
Shengliang Guan c581212712
Merge pull request #16439 from taosdata/feature/3_liaohj
feature(query): support last function cache and retrieve data.
2022-08-28 21:27:13 +08:00
Haojun Liao 655dbb47c1 refactor(query): do some internal refactor. 2022-08-26 19:19:48 +08:00
Haojun Liao 60d9acb7b4 feature(query): support last function cache and retrieve data. 2022-08-26 15:27:19 +08:00
slzhou f3890f7421 feat: support udf merge in udfd 2022-08-26 14:27:15 +08:00
Haojun Liao 1c06206000 other:merge 3.0 2022-08-25 11:01:36 +08:00
54liuyao 25b735f0e3 feat(stream): delete result 2022-08-22 14:05:19 +08:00
Ganlin Zhao c017e4387f fix(query): forbid interp in super table query
TD-18331
2022-08-11 16:17:38 +08:00
Haojun Liao d8455841e0 refactor: do some internal refactor. 2022-08-10 20:12:32 +08:00
slzhou e9f79254fb fix: merge spread into output when input spread has result 2022-08-08 15:23:55 +08:00
shenglian zhou 03aae25b63 fix: function rename and trigger ci test 2022-08-07 06:39:26 +08:00
shenglian zhou 81d3a2c385 fix: last/first must return not null values 2022-08-06 21:39:53 +08:00
Ganlin Zhao b0becf1ca9 fix(query): fix n-1 function if select column after function position
result row is incorrect.

fix/TD-18040
2022-08-01 14:15:16 +08:00
Xiaoyu Wang 41b8ef7d93 enh: cumulative functions support mixed use 2022-07-29 18:00:48 +08:00
Xiaoyu Wang b12fa7494e enh: add interface for dynamic control data scan 2022-07-27 18:28:54 +08:00
Ganlin Zhao db48f118a1 enh(query): add selectivity for diff function
TD-17659
2022-07-25 15:34:46 +08:00
Xiaoyu Wang 958f3586c0 fix: the problem of data loss when interval is used for outer query 2022-07-22 11:41:18 +08:00
dapan1121 9ec14ece62 fix: fix taosd mem leak 2022-07-16 18:58:29 +08:00
Xiaoyu Wang aec4c2313a fix: multi-rows function validity check 2022-07-15 16:17:00 +08:00
Haojun Liao 707f0a837a fix(query): set correct fill output object. 2022-07-14 20:11:29 +08:00
Xiaoyu Wang 4830b7d9d3 feat: support pseudo columns such as _qstart, _qend and _qduration 2022-07-13 18:12:02 +08:00
Xiaoyu Wang 43b5ca1efe feat: support pseudo columns such as _qstart, _qend and _qduration 2022-07-13 15:13:01 +08:00
Haojun Liao c5ccdfd4e9 fix(query): set the correct resource free flag. 2022-07-09 11:06:41 +08:00