Commit Graph

154 Commits

Author SHA1 Message Date
Jing Sima 410324746b
feat:[TS-4897] virtual table (#30098)
* feat: [TS-4897] Support create/drop/alter/show/describe vtable

* feat: [TS-4897] Support vtable's query

* feat: [TS-4897] Support create virtual supertable

* feat: [TS-4897] Support explain analyze / where / count(*) and only select ts of vtable.

* feat: [TS-4897] Add create test and fix bugs

* feat: [TS-4897] Add alter/drop test and fix bugs

* feat: [TS-4897] Add describe/show test and fix bugs

* feat: [TS-4897] Add auth test and fix bugs

* feat: [TS-4897] Fix meta/catalog/cache bugs

* feat: [TS-4897] Support select tag from virtual child table

* feat: [TS-4897] Add select test and fix plenty of bugs

* feat: [TS-4897] Add optimize rule for vtable scan / support create vtable cross database / remove enterprise constraint / fix bugs.

* feat: [TS-4897] Fix 'schema is old'

* feat: [TS-4897] Support virtual stable query

* feat: [TS-4897] Add tests and Fix bugs

* feat: [TS-4897] resolve conflict.
2025-03-15 14:10:46 +08:00
liuyao 2de6736160
feat(stream): add new trigger continuous_window_close (#30125)
* opt stream build twa result

* opt force window close memory

* feat(stream):optimize new interval and scan operator

* adj log

* opt code

* opt code

* fill history

* fix issue for fill history

* add ci

* feat(stream): add new stream nonblock interval operator

* adjust code

* use new scan operator

* use new scan operator

* add log

* fix issue

* recover stream scan next function

* fix issue

* fix issue

* fix issue

* ignore disorder data

* fix issue

* fix issue for interval sliding

* fix issue

* fix ci issue

* fix ci issue

* fix ci issue

* add semi && final nonblock interval operator

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* refactor(stream): track the msgId for each upstream tasks.

* fix(stream): fix race condition.

* fix(stream): update the task last msgId when putting into input queue succ.

* fix issue

* fix issue

* put recalculate data to rocksdb

* fix issue

* fix issue

* enh(query)[TD-33071]: add support for saving and restoring tsdbReader scan progress

- Implement functionality to save scan progress during tsdbReader operations
- Enable resuming scans from the last saved position

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* add rec interval check

* enh(stream):add recalculate tasks.

* enh(stream): support the re-calculate the tasks.

* fix issue && do refactor

* do refactor

* fix issue

* fix issue

* update backend opt

* add new interface

* add new session operator

* support blob

* add new session operator

* fix issue

* add rec state for rec task

* fix invalid read

* add new session window

* enh(stream): update the stream tasks backend.

* new session operator

* add pull data

* fix(stream): fix error in expand stream backend.

* fix issue

* fix issue

* fix issue

* merge code

* fix issue

* fix(stream): check for null ptr.

* fix(stream): add more check.

* fix issue

* fix issue

* fix issue

* add debug code

* fix issue

* fix issue

* fix issue

* set rec end flag

* fix(stream): opt re-calculate stream tasks.

* fix issue

* fix issue

* add new operator

* enh(stream): dispatch recalculate block to agg tasks.

* fix issue

* fix issue

* fix(stream): adjust filter.

* fix issue

* refactor

* refactor(stream): adjust the recalculate end block.

* fix issue

* fix(stream): set correct create trigger block.

* fix issue

* fix(stream): fix error in build recalculate end block.

* fix(stream): check null ptr.

* add stream client && fix issue

* fix mem leak

* fix(stream): free msg.

* add stream client

* fix(stream): fix error.

* add stream client && fix issue

* add stream client

* refactor(stream): set the recalculate task complete.

* add wend and group_id for session window dest table

* feat(stream): refactor and set the recalcul agg task complete.

* add cfg for adapter

* fix issue

* add state && event operator

* feat(stream): support fill-history task.

* add new fill operator

* fix(stream): set correct backend when updating fill-history task to recalculate task.

* add new fill operator

* fix(stream): s2025-03-06 11:10:31.272
et ops always open in scan tsdb

* fix(stream):set the correct taskType for sink task.

* new fill operator

* adj stream fill operator

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* fix issue

* adj test

* fix issue

* fix(stream): fix issue

* fix(steam): fix issue

* fix(steam): fix issue

* fix(steam): fix issue

* fix(steam): fix issue

* fix(stream): fix issue

* fix(stream): fix issue

* fix(stream): fix issue

* fix: ut com error

* fix(stream): fix mem leak and adjust operator type check rule

* fix(stream): fix mem leak and adjust test case

* refactor code

* fix(stream): free items.

* fix(stream): free fix memory leak.

* fix(stream): fix syntax error.

* fix: ignore unexpect block

* fix: adjust op type

---------

Co-authored-by: Haojun Liao <hjliao@taosdata.com>
Co-authored-by: Jinqing Kuang <kuangjinqingcn@gmail.com>
Co-authored-by: yihaoDeng <luomoxyz@126.com>
2025-03-14 20:14:01 +08:00
factosea 36183aa36b feat: greatest func 2025-03-11 13:38:57 +08:00
factosea 465f19567e fix: cols func 2024-12-27 08:56:28 +08:00
factosea 7964e5e6b7 cols function 2024-12-17 15:12:14 +08:00
yihaoDeng 3d92cbb691 Merge remote-tracking branch 'origin/3.0' into enh/addDiskUsage 2024-12-02 19:05:33 +08:00
wangjiaming0909 3239a10b76 support interp fill extension 2024-11-28 20:30:53 +08:00
yihaoDeng 42065bf2e8 Merge remote-tracking branch 'origin/3.0' into enh/addDiskUsage 2024-11-14 17:44:29 +08:00
yihaoDeng eddc7918d3 add quick cmd 2024-11-12 21:10:17 +08:00
Shengliang Guan 0be118c0aa
Merge pull request #28408 from taosdata/enh/TD-32181/client
Enh/td 32181/client
2024-11-06 09:42:05 +08:00
dapan1121 9f2fba6269 Merge remote-tracking branch 'origin/main' into enh/TD-32190 2024-10-28 18:48:40 +08:00
xsren 323088dc71 fix: create partialfunction 2024-10-27 22:41:34 +08:00
Shengliang Guan 3003e7286e feat: data analysis 2024-10-15 10:00:38 +08:00
Shengliang Guan 9f05ca5ee8 revert: data analysis 2024-10-14 23:27:11 +08:00
Shengliang Guan 4dc0c2f47e feat: data analysis 2024-10-09 17:09:43 +08:00
dapan1121 65985c7aaa enh: add tag scan test 2024-09-27 18:08:36 +08:00
54liuyao aa80aa39bc fix(query):use window start key when ts column is null 2024-09-12 15:34:57 +08:00
xsren 4b872f849c fmFuncDynDataRequired: only return state 2024-08-27 17:07:13 +08:00
sima a54019211f feat:[TS-4893] Support MYSQL functions.
Add more functions:
 - Numeric Functions: PI(),ROUND(),TRUNC(),EXP(),LN(),SIGN(),DEGREES(),RADIANS().
 - String Functions: CHAR(),ASCII(),POSITION(),TRIM(),REPLACE(),REPEAT().
 - Date and Time Functions: WEEKDAY(),DAYOFWEEK(),WEEK(),WEEKOFYEAR().
 - Aggregate Functions: VAR_POP().
Modify some functions:
 - ROUND(): support round to given decimal places.
 - CHAR_LENGTH(): support calculate multi-byte character's length.
 - TIMEDIFF(): result will be negative when expr1 < expr2.
 - STDDEV(): add alias name STDDEV_POP().
 - SUBSTR(): add alias name SUBSTRING().
             support new syntax SUBSTRING/SUBSTR(expr FROM pos [FOR len]).
2024-08-14 09:19:25 +08:00
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