Commit Graph

53 Commits

Author SHA1 Message Date
Jinqing Kuang c82398e175 fix(stream): fix stream processing for virtual tables
- Fixed status check in virtual table stream processing
- Fixed multi-way merge logic for super virtual tables
- Fixed generation of target subtable names during merge
2025-03-20 01:15:54 +08:00
Jinqing Kuang ac23a4fc55
feat(stream): support stream processing for virtual tables (#30144)
* enh: add client processing

* enh: add mnode vtables processing

* enh: add mnode vtable processing

* enh: add normal child vtable support

* fix: compile issues

* fix: compile issues

* fix: create stream issues

* fix: multi stream scan issue

* fix: remove debug info

* fix: agg task and task level issues

* fix: correct task output type

* fix: split vtablescan from agg

* fix: memory leak issues

* fix: add limitations

* Update 09-error-code.md

* Update 09-error-code.md

* fix: remove usless case

* feat(stream): extract original table data in source scan task

Implemented functionality in the source task to extract data
corresponding to the virtual table from the original table using WAL.
The extracted data is then sent to the downstream merge task for further
processing.

* feat(stream): multi-way merge using loser tree in virtual merge task

Implemented multi-way merge in the merge task using a loser tree to
combine data from multiple original table into a single virtual table.
The merged virtual table data is then pushed downstream for further
processing.  Introduced memory limit handling during the merge process
with configurable behavior when the memory limit is reached.

* fix(test): remove useless cases

---------

Co-authored-by: dapan1121 <wpan@taosdata.com>
Co-authored-by: Pan Wei <72057773+dapan1121@users.noreply.github.com>
2025-03-15 17:06:48 +08:00
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
54liuyao 2eb0d34d0f Merge branch 'main' of https://github.com/taosdata/TDengine into fix/TD-33020 2024-11-29 08:59:06 +08:00
facetosea a2f8a822da remove some check 2024-11-27 19:51:27 +08:00
54liuyao 22023575ba opt stream force fill op 2024-11-26 19:46:36 +08:00
factosea 04af5f4b94 enh: check param 2024-11-19 19:38:40 +08:00
factosea f3acf49e22 enh: include 2024-11-19 16:23:46 +08:00
54liuyao 0e0a7ae2e9 Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-11-01 09:54:51 +08:00
dapan1121 9f2fba6269 Merge remote-tracking branch 'origin/main' into enh/TD-32190 2024-10-28 18:48:40 +08:00
dapan1121 7a45984c96 fix: table seq scan issue 2024-10-24 15:28:09 +08:00
54liuyao 3365da365f Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-10-22 10:17:49 +08:00
54liuyao 944457d7a6 Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-10-16 12:09:17 +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
54liuyao dd7f705dcc Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-10-09 19:31:44 +08:00
Shengliang Guan 4dc0c2f47e feat: data analysis 2024-10-09 17:09:43 +08:00
54liuyao 9d8e8892b4 Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-08-30 16:04:09 +08:00
xsren d43df78537 fix: free operator 2024-08-29 19:43:59 +08:00
Haojun Liao c118df0ec4 fix(query): fix memory leak. 2024-08-27 17:04:44 +08:00
54liuyao 0bd8c57049 Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-07-29 09:24:40 +08:00
Haojun Liao 7be2ecbe1f fix(common): check the return value. 2024-07-27 18:55:34 +08:00
54liuyao b5f432bd50 Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837 2024-07-26 16:44:18 +08:00
Haojun Liao aacf1c3e9a fix(stream): check return value. 2024-07-24 17:08:08 +08:00
Haojun Liao eefee54c6a fix(stream): check return value. 2024-07-23 17:31:41 +08:00
54liuyao 1c9011e820 stream time slice 2024-07-12 11:03:45 +08:00
54liuyao 9e86dfaee7 stream count window sliding 2024-01-26 15:56:26 +08:00
54liuyao 3bbfb26e09 stream count window 2024-01-17 14:22:19 +08:00
liuyao f51c985914 stream event window 2023-10-25 17:50:16 +08:00
yihaoDeng 6fe649c458 Merge branch 'enh/3.0' into enh/triggerCheckPoint2 2023-08-21 09:12:40 +08:00
Haojun Liao ea6574b3c7 other: merge 3.0 2023-08-17 00:07:55 +08:00
dapan1121 143c657571 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-08-16 14:50:31 +08:00
shenglian zhou b2e615d4e7 enhance: tag scan cursor based block 2023-08-10 17:30:01 +08:00
dapan1121 ce1b294c51 fix: memory leak issues 2023-08-10 11:29:14 +08:00
dapan1121 9ed1417bba enh: remove group cache 2023-07-28 18:00:33 +08:00
dapan1121 188df1d675 fix: fix bugs 2023-07-14 19:36:56 +08:00
liuyao 020cdf4d27 get checkpoint id 2023-07-12 14:06:36 +08:00
dapan1121 c19c59d5e6 enh: optimize oprator param usage 2023-07-07 16:49:35 +08:00
dapan1121 779224f0a6 fix: fix bugs 2023-07-06 19:33:31 +08:00
dapan1121 18c2400c75 fix: dynamic query ctrl compile issues 2023-07-06 11:13:43 +08:00
dapan1121 b371b7e6be fix: compile issue and merge join crash issue 2023-07-06 10:52:28 +08:00
dapan1121 0718859c0a enh: support passing params between nodes 2023-07-05 19:24:06 +08:00
dapan1121 c85bbef2e9 Merge remote-tracking branch 'origin/3.0' into feat/TD-24700 2023-07-05 11:13:57 +08:00
dapan1121 7b9d73c77a feat: add dynamic query ctrl operator 2023-07-05 11:07:08 +08:00
dapan1121 5971395dcf feat: add group cache operator 2023-07-03 13:42:06 +08:00
dapan1121 60290b98e4 feat: add group cache operator 2023-06-30 19:20:36 +08:00
liuyao e236bf818c set fill history info 2023-06-25 17:47:10 +08:00
dapan1121 24a5a3f41b fix: compile issues 2023-06-25 17:31:04 +08:00
liuyao c58bde9715 stream operator fill history 2023-06-13 10:57:36 +08:00