Commit Graph

135 Commits

Author SHA1 Message Date
sima 1285100f68 enh:[TD-31043] Handling return value in functionMgt.c 2024-07-23 15:37:17 +08:00
xsren 2a675ccf6b group const value func 2024-07-22 11:19:11 +08:00
xsren ebe0074da4 fix: interp crash 2024-07-22 00:06:47 +08:00
factosea 5f0ac46029 diff 2024-07-04 11:04:59 +08:00
wangjiaming0909 f6200dd923 support long ctb names 2024-04-16 14:25:34 +08:00
wangjiaming0909 fa85d1caa7 support other tsma funcs 2024-04-16 14:23:25 +08:00
wangjiaming0909 cc9550f45e add tsma funcs 2024-04-16 14:20:59 +08:00
wangjiaming0909 895a4584e6 generate tsma plan 2024-04-16 14:14:39 +08:00
wangjiaming0909 4b6fb0ffc6 tsma optimization 2024-04-16 14:14:39 +08:00
wangjiaming0909 0fd66d7e8a tsma optimization 2024-04-16 14:14:39 +08:00
wangjiaming0909 ef47fd57d6 support tsma catalog cache 2024-04-16 14:14:34 +08:00
dapan1121 55d118d17c Merge remote-tracking branch 'origin/3.0' into feat/TD-27337 2024-04-16 09:12:04 +08:00
dapan1121 8407eb3791 enh: outer join performance optimization 2024-04-09 09:48:38 +08:00
slzhou 4d3eb6824c feat: add pk support for last/first/last_row dynDataRequired 2024-03-25 13:38:34 +08:00
shenglian zhou cee96e2048 feat: begin coding function 2024-03-19 13:57:12 +08:00
wangmm0220 a8e45440c0 fix:conflicts from 3.0 2024-02-18 18:02:14 +08:00
Haojun Liao cb2ea4a721 fix(stream): take ver snapshot for all vgroups before launching stream with fill-history option opened. 2024-02-01 11:37:57 +08:00
wangmm0220 2ab54a1335 fix:conflicts from 3.0 2024-01-15 16:54:52 +08:00
54liuyao 52d8811bdc code coverage 2024-01-12 13:49:32 +08:00
wangmm0220 eac86f72b3 fix:partical func parameters for middle interval[checkStreamSTable1.sim] 2023-12-22 18:30:22 +08:00
wangjiaming0909 f299a28109 feat: support to_timestamp/to_char 2023-10-23 19:36:03 +08:00
wangjiaming0909 1e53e6cfeb optimize count()/last() + partition by tbname/tag 2023-09-19 14:56:02 +08:00
dapan1121 2e7897239a fix: trim block and partition by constant function issue 2023-08-30 16:51:44 +08:00
dapan1121 3045a623e1 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-08-17 14:16:05 +08:00
Ganlin Zhao 01a7dfbc34 feat: add irate distributed execution 2023-08-15 12:59:30 +08:00
dapan1121 9f0da17c49 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-06-28 19:40:55 +08:00
dapan1121 4dae9f4eff merge main to 3.0 2023-06-26 18:43:00 +08:00
dapan1121 ce2635074d enh: add uid/vgid functions 2023-06-26 11:48:47 +08:00
dapan1121 170182fecd feat: support fill history with sub request 2023-06-12 16:10:54 +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
dapan1121 0dd0b16842 enh: optimize table scan for last query 2023-05-12 13:30:17 +08:00
Ganlin Zhao 7414f28d17 fix translatefunc not getting precision issue 2023-04-13 11:22:15 +08:00
54liuyao ffa59f69aa fix:add combine function for groupKey 2023-03-23 15:20:45 +08:00
Xiaoyu Wang 09925437e3 merge main 2023-02-08 09:51:52 +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
Ganlin Zhao 5da2fe9bc5 feat(query): add _isfilled pseudocolumn to indicate data is origin
or filled.
2022-12-14 16:56:10 +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
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
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
Xiaoyu Wang 2ccc7471af enh: query get dbcfg optimization 2022-08-31 11:36:59 +08:00
Ganlin Zhao c017e4387f fix(query): forbid interp in super table query
TD-18331
2022-08-11 16:17:38 +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
Xiaoyu Wang 958f3586c0 fix: the problem of data loss when interval is used for outer query 2022-07-22 11:41:18 +08:00