Commit graph

513 commits

Author SHA1 Message Date
WANG Xu
c52c68aa4f
sync: apply remaining build system changes from monorepo (main)
The following commits could not be applied individually due to context
differences between the monorepo and the public repo's build files.
They have been applied as a cumulative diff to ensure the final state
matches the monorepo exactly:

- chore: sync CI files with 3.0 branch to eliminate merge conflicts (rd-public/tsdb!271)
- revert(refactor): dynamically link taosd taosudf taosmqtt against libtaosnative.so to reduce binary size (revert #183) (rd-public/tsdb!282)
- fix(docs): autofix formatting issues across all doc files (rd-public/tsdb!296)
- feat: support -DBUILD_SANITIZER=true on windows for debug build (rd-public/tsdb!291)
- feat(build): build cache, mirror, and sccache optimizations (rd-public/tsdb!326)
- docs: update image for three replica (rd-public/tsdb!324)
- enh: shared storage on windows (rd-public/tsdb!333)
- fix(cmake): convert ext_libs3 from git clone to URL tarball download (rd-public/tsdb!360)
- feat: dual-source deps and comprehensive docs/packaging (cherry-pick to main) (rd-public/tsdb!352)
- fix(cmake): guard DOWNLOAD_EXTRACT_TIMESTAMP for CMake < 3.24 and fix duplicate Cargo.lock entry (rd-public/tsdb!369)
- fix: test case execution failure in pytest.sh (rd-public/tsdb!338)
- enh: built-in compilation support for Python UDF plugins use abi3 (rd-public/tsdb!325)
2026-05-23 14:11:50 +08:00
Jinqing Kuang
5f8c328226
feat(stream): support external window join subqueries (#35255)
Some checks failed
TDengine Release Build / Run on macos-14 (push) Has been cancelled
TDengine Release Build / Run on ubuntu-22.04 (push) Has been cancelled
2026-05-06 09:53:29 +08:00
Kaili Xu
fde63d139e
feat(mac): sod mandatory and mac[manual-only] (#35121) 2026-04-22 20:26:42 +08:00
Jinqing Kuang
3a9e444b41
fix(parser): relax stream tag type modifier checks for stream tags (#35089) 2026-04-09 14:00:07 +08:00
Jinqing Kuang
395d03fa24
fix(planner): verify %%tbname to use single-table external window (#35054) 2026-04-06 13:49:52 +08:00
Jinqing Kuang
b9eb340111
feat(stream): implement idle trigger for stream partitions (#34902)
- Add IDLE_TIMEOUT(duration_time) option to STREAM_OPTIONS for
  configuring partition idle detection (valid range: [1s, 10d])
- Add IDLE and RESUME event types to EVENT_TYPE option
- Track per-partition last-receive time using monotonic clock to
  detect idle state transitions (ACTIVE -> IDLE -> ACTIVE)
- Trigger IDLE event once when a partition exceeds idle timeout;
  trigger RESUME event immediately when idle partition receives data
- Provide _tidlestart/_tidleend placeholders for idle/resume
  computation SQL (ns precision; incompatible with _twstart/_twend)
- Add idle/resume fields to notification payload: idleStart,
  idleEnd, idleDurationMs; IDLE and RESUME share the same triggerId
- Add system test: test/cases/18-StreamProcessing/04-Options/
  test_idle_trigger.py covering basic detection, resume, multiple
  partitions, timeout config, placeholder values, event combinations
- Update zh/en SQL reference and advanced-usage docs; add IDLE,
  IDLE_TIMEOUT, RESUME to reserved keywords list (3.3.4.0+)

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 10:14:40 +08:00
Bomin Zhang
1138439542
feat: batch tag value update (#34564) 2026-03-18 14:19:15 +08:00
Zhixiao Bao
e29fadda2e
feat: support secure delete option. (#34591) 2026-03-16 20:26:22 +08:00
Jinqing Kuang
163aa941de
feat(stream): add natural time units support for PERIOD trigger (#34766)
Implement week/month/year units for stream PERIOD trigger with natural
boundary alignment and offset support.

Key changes:
- Parser: Add validation for natural time units (w/n/y) and offset parameter
- Time utilities: Add getDuration() support for week/month/year units
- TriggerTask: Implement window calculation with natural boundary alignment
  - Week: align to Monday 00:00:00
  - Month: align to 1st of month 00:00:00
  - Year: align to Jan 1st 00:00:00
- Add offset support: PERIOD(1w, 1d) shifts window by 1 day
- Unit tests: Parser validation, time utilities, TriggerTask window calculation
- System tests: End-to-end tests for week/month/year units with offset
- Documentation: Update user manual with natural time unit examples

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:43:36 +08:00
Pan Wei
30c4ea4986
feat: support any/some/all/exists with subqueries (#34632) 2026-03-06 14:45:30 +08:00
Simon Guan
d26a0ee67a fix: conflicts 2026-02-26 14:06:02 +08:00
Zhixiao Bao
d1009e3058
fix: ut ParserStreamTest.TestQuery exec failed. (#34532)
* fix: ut ParserStreamTest.TestQuery exec failed.

* fix: repoen test parse test.
2026-02-09 23:34:21 +08:00
Simon Guan
7028cb234e fix: conflicts 2026-01-30 10:28:30 +08:00
Jinqing Kuang
6defccb35a
feat(stream): support true for row count limit (#34342) 2026-01-29 14:54:28 +08:00
Kaili Xu
b3e56f99ae
enh(rbac): access control (#34259) 2026-01-28 19:06:16 +08:00
Pan Wei
b772a5d7f3
feat: support IN/NOT IN with subquery (#34290) 2026-01-22 13:39:05 +08:00
Jinqing Kuang
630c97e135
fix: stream issues (#34254) 2026-01-12 19:11:51 +08:00
Kaili Xu
31126ab2b6
feat(rbac): access control (#33822) 2025-12-29 19:27:11 +08:00
xinsheng Ren
3596a9cb1c
enh(TD-29642): prohibit sorting by aggregate functions in non-aggregate queries (#33931) 2025-12-23 13:43:46 +08:00
Bomin Zhang
93fe726f9c
feat[TS-7231]: identity authentication (#33702) 2025-12-05 17:35:10 +08:00
Jing Sima
573fa8b37a
feat: [TD-37059] Support expr in stream partition list. (#32846) 2025-09-28 15:39:55 +08:00
WANG MINGMING
558928cbe1
feat(stream): optimize stream logic (#33027)
* fix: remove debug log

* fix: remove assert

* fix: delete unused code

* enh: [TD-37251] Support expr in state window.

* feat(stream): support expr in state window trigger

* enh: [TD-37251] Fix SCL_IS_CONST_CALC condition.

* fix(stream): set ver in wal

* fix: print code

* fix: increase runner replica num

* fix: trigger mem error

* fix: sliding _tnext_ts value

* fix(stream): disable tagFilterCache in stream reader trigger

* fix: crash

* Revert "fix(stream): fix history calc finish check"

This reverts commit f93d17f1d2.

* Revert "fix(stream): fix calc request allocation in trigger"

This reverts commit c5410f6da0.

* fix(stream): fix calc request allocation in trigger

* enh: [TD-37251] External window support more placeholder.

* fix(stream): modify size of return from 1000000->4096

* enh: [TD-37251] Modify error msg when stream query do not have from clause.

* fix(stream): add log for group not found

* fix(stream): do not return gid=0 in walMetaData interface

* enh: [TD-37251] Fix missing ts column in vtable query.

* fix: test case build failed

* fix: invalid read issue

* fix(stream): add vtable logic

* fix(stream): encode error in wal

* fix(stream): add vtable logic

* fix(stream): add log

* fix: diff funcition crash

* Revert "Merge branch 'enh/TD-37251-3.0-dropoutput' into enh/TD-37251-3.0"

This reverts commit e93cbd6fd4, reversing
changes made to dc3230591d.

* Revert "Merge branch 'enh/TD-37251-3.0-vtable' into enh/TD-37251-3.0"

This reverts commit dc3230591d, reversing
changes made to 085e086782.

* fix(stream): fix block data len is too large if data type is vchar

* fix: drop output table

* feat: runner delete output table

* process pDropBlock in trigger task.

* fix(stream): opti log level

* fix(stream): build block for drop table

* fix(stream): set gid for normal table

* fix(stream): set gid for normal table

* feat: Support delete output.

* fix(stream): rows error

* fix(stream): memory leak

* enh: [TD-37251] Fix external window wrong ts column.

* fix(stream): fix calc time check in batch mode

* fix: merge aligned external window issue

* Revert "fix(stream): fix calc time check in batch mode"

This reverts commit d895b7f577.

* fix(stream): add test case

* fix(stream): add insert drop table logic

* fix: external window end issue

* fix(stream): add test case

* fix(stream): fix trigger pull data

* fix(stream): fix history calc request

* enh: drop table on snode

* fix(stream): adjust hash index if data is filtered in wal

* fix(stream): rollback

* enh: add merge aligned extwin window row idx

* fix: drop output table

* fix: compile issue

* enh: [TD-37251] Add flag to identify interval window is overlapped

* fix: overlap

* fix(stream): set gid=-1 for initialized

* fix(stream): modify log level

* fix: trigger slow issue

* fix(stream): add basic test for obj pool

* fix(stream): fix metadata clear in trigger

* fix(stream): fix idle runner allocation in trigger

* fix: handle agg output on externalWin

* fix: test case

* fix(stream): adjust log

* fix: reset pCtx pOutput

* fix: memory leak

* fix: search first win for tsCol

* fix(stream): add test case for schema change

* fix: mem leak

* fix: mem leak

* Reapply "Merge branch 'enh/TD-37251-3.0-vtable' into enh/TD-37251-3.0"

This reverts commit b508e66958.

* fix(stream): fix virtual table data pull

* fix(stream): fix set table request

* fix(stream): process empty uidlist

* fix(stream): fix set table request

* fix(stream): fix data new request in trigger

* fix(stream): tablelist error for vtable

* fix(stream): block ver is null

* fix(stream): remove version limition for wal

* fix(stream): block rows error

* fix(stream): fix pending calc param in batch mode

* fix(stream): auto create table

* fix(stream): fix stream vtable data merge

* fix: _tcurrentts

* fix(stream): destroy hash

* fix(stream): fix trigger status

* fix(stream): colId error in vtable

* fix(stream): update nrows of vtable data block

* fix(stream): fix trigger status

* fix(stream): enable low latency calc for period trigger

* fix: test case file path

* fix: test case file path

* fix: string to node in reader

* enh: add test log

* fix(stream): increase wait time of non-low-latency mode

* fix(stream): fix column capacity in scalar calculation

* fix(stream): fix column capacity in trigger expr calculation

* fix: get origTableInfos

* fix(stream): fix calc data pull in trigger

* fix(stream): fix calc data cache write in trigger

* enh: [TD-37251] Add flag to identify interval wind

* fix: external window memory usage issue

* fix(stream): fix epxr result column in trigger

* fix(stream): add metaCache for calc plan

* fix(stream): fix stream obj list clear

* fix(stream): rollback

* enh: [TD-37251] Add flag to identify interval wind

* fix: mem free

* fix(stream): add metaCache for calc plan

* fix(stream): fix calc data cache write in trigger

* fix(stream): fix calc data cache write in trigger

* enh: optimize external result block memory

* fix(stream): modify logic of judge table for create table

* fix(stream): fix event window check in trigger

* fix(stream): fix count window check in trigger

* fix(stream): colSize=0 while encoding block because pDataCol->hasNull is false in secode time & reload table list if create table

* enh: optimize stream memory

* fix(stream): trigger tag error

* fix: add log

* fix(stream): fix calc data write in trigger

* fix: drop output table

* fix(stream): fix max delay in trigger

* fix: drop output table

* fix(stream): fix max delay in trigger

* fix(build): handle return value of function

* fix(stream): read gid error if it is child table in stream

* fix(stream): fix calc param of history calculation

* fix(stream): fix recalc of delete data

* fix(stream): fix calc data of period trigger

* fix(stream): fix cache read check

* fix(stream): filter error in calc plan

* fix: reset externla window expr

* fix(stream): fix calc parm of max delay

* fix: time range and case issues

* fix(stream): fix crash in trigger

* fix: case issues

* fix: fix window node mem leak.

* fix(stream): fix meta data clear in trigger

* fix(stream): table schema is old in TsdbDataRequest for vtable

* fix: fix slingding window place holder check condition.

* Revert "fix: fix slingding window place holder check condition."

This reverts commit ad864a1dc1.

* fix(stream): null pointer error

* fix: case issue

* fix(stream): calc data error for vtable

* fix(stream): fix data sorter in trigger

* fix(stream): add log for delete data

* fix(stream): fix start version of realtime calculation

* fix(stream): fix cache data merger of vtable

* fix: case issues

* fix(ci): upgrade stream cases in test_cols_function

* fix(stream): gid not found if change tag value

* fix: fix slingding window place holder check condition.

* fix(stream): fix virt table info request in trigger

* fix(stream): set gid = uid if stream table type != SUPER table

* fix: clean cache data by group

* fix: add block info and case issues

* fix: fix heap-buffer-overflow.

* fix(stream): fix state window with extend param

* fix: fix access null pointer.

* fix: case issues

* fix: case issue

* fix(stream): fix ignore_nodata_trigger option for period trigger

* fix(stream): fix pseudo col fetch for calc data

* fix: Extend checking time to avoid timeout.

* fix: case issues

* fix(stream): fix group col fetch for virtual tables

* fix(stream): tag is NULL for non vtable

* fix(stream): fix sliding check of virtual table

* test(stream): check stream status after create all streams

* fix: add log

* fix(stream): fix wal meta truncate when ignore disorder

* fix(stream): gid not found for child table

* fix: fix place holder condition pushdown error.

* fix(stream): suid not equal when delete data for child table

* fix: id issue

* fix(stream): disable recalc for count trigger

* fix: cast result rowSize error in project

* fix(stream): add log for tsdb meta

* fix(stream): fix gid in tsdb meta request

* fix(stream): fix wend of unclosed windows

* fix(stream): fix ignore_nodata_trigger option for period trigger

* fix: case issues

* fix(stream): fix calc data pull for empty interval window

* fix: fix ext window condition.

* fix(ci): smaBasic performance check affectd by debug level log

* fix(stream): add suid when set table list for vtable

* fix: forbid using prefilter when using %%trows an trigger table is virtual table.

* fix: forbid prefilter %%trows cases.

* fix(stream): sort cid in tsdbVirtalDataReq

* fix: forbid prefilter %%trows cases.

* fix(stream): add log for virtual table tsdb data

* fix(stream): get delete msg for vtable

* fix: winRowIndex

* Revert "fix: winRowIndex"

This reverts commit e08b41cf96.

* fix(stream): fix data merge in trigger

* test(stream): fix case ans

* fix(stream): fix empty calc data pull for period trigger

* fix(stream): col index error for tsdbVirtalDataReq

* fix(stream): pTableList is NULL for vtable

* test(stream): fix case ans

* fix(stream): fix notification in trigger

* fix(stream): memory leak

* fix(stream): fix virtual data pull in trigger

* test(stream): fix case ans

* fix(stream): col index error for tsdbVirtalDataReq

* fix(stream): pTableList is NULL for vtable

* test(stream): fix case ans

* fix(stream): fix notification in trigger

* fix(stream): memory leak

* fix(stream): fix virtual data pull in trigger

* test(stream): fix case ans

* fix: case issue

* fix: crash issue

* fix: forbid prefilter %%trows cases.

* fix(stream): session case

* fix(stream): fix data pull for virtual tables

* fix(stream): add log

* fix(stream): fix calc req send in batch mode

* fix: fix stream UT

* fix(stream): tablelist is null for non vtable

* fix: mem leak

* fix(stream): fix compile error in trigger

* fix: return code issue

---------

Co-authored-by: dapan1121 <wpan@taosdata.com>
Co-authored-by: facetosea <285808407@qq.com>
Co-authored-by: Jing Sima <simondominic9997@outlook.com>
Co-authored-by: Jinqing Kuang <kuangjinqingcn@gmail.com>
Co-authored-by: Tony Zhang <tonyzhang@taosdata.com>
2025-09-25 15:48:14 +08:00
Tony Zhang
e4777c94b8
feat: support extend option in state window (#33003) 2025-09-22 13:52:52 +08:00
Jing Sima
308b3fd30e
fix: [TD-37529] Sliding offset cannot be used with interval in trigger window. (#32635) 2025-08-26 14:42:06 +08:00
Jing Sima
074fd94c9f
feat[TD-37210]: trigger scan plan optimize (#32633) 2025-08-21 15:46:57 +08:00
Jing Sima
e669dc2be0
test: [TS-6100] Reopen stream ut (#32396) 2025-07-31 11:30:50 +08:00
Jing Sima
82eb54b33b
test: [TS-6100] Reopen UTs (#32363) 2025-07-30 15:11:10 +08:00
Pan Wei
bcc25e56bc
feat: new stream (#31678)
* fix: windows compile issue

* test: add vtable cases (#31829)

* fix: windows compile issues

* test:add test cases

* fix: windows compile issue

* case: em-4 stream case submit

* test: stream4_sub1 found bug2

* test: submit test_scene_meters_bug2.py

* add stream parameters example

* feat: [TS-6100] Do not translate const value as column.

* Feat/ts 6100 3.0 zlv (#31747)

* modify asan exampel

* modify asan exampel

* add example

* add example

* modify case example

---------

Co-authored-by: zelv01 <1101510017@qq.com>

* feat(stream): fix memory leak

* modify sliding example

* test: update test case.

* feat(stream): fix conflicts

* fix: add offset case 10a 10s 10m 10h 10d

* feat(stream): fix conflicts

* chore(stream): rename case name #TS-6100

* add case

* modify example

* fix: windows compile issues

* fix: data null check

* feat: [TS-6100] Forbid where when using %%trows (#31827)

* feat: [TS-6100] Forbid where when using %%trows

* test: update cases

* feat: [TS-6100] Fix leaks.

---------

Co-authored-by: Simon Guan <guanshengliang@qq.com>

* test: reproduce bugs

* test: update test case.

* test: update test case.

* feat: [TS-6100] Fix leaks.

* test: add cases

* Feat/ts 6100 3.0.pw10 (#31841)

* enh: add operator reset func

* fix: merge join reset issue

* fix: memory issues

* fix: add debug assert

* fix: memory issues

* fix: memory leak

* fix: memory issues

* fix taos log miss

* fix: case issue

* fix: case issue

* fix: case issues

* fix: drop dnode issue

* fix: memory issues

* fix: memory issues

* fix: memory leak issues

* fix: recalculate time range issue

* fix: add debug log

* fix: memory issues

* fix: enable case asan

* Update streamlist_for_ci.task

* fix: case asan issue

* fix: stream name issue

* fix: external window compile issues

* fix: deploy memory issue

* fix: ahandle issue

* fix: ahandle issue

* fix: ahandle issue

* fix: virtual table reader list issue

* fix: log info

* fix: msg error

* fix: virtual table addr list issue

* fix: memory issues

* fix: memory leak issue

* fix: memory issues

* fix: memory free issues

* fix: memory issues

* fix: snode deploy issue

* fix: mnode reader issue

* fix: memory issues

* fix: add debug test

* enh: add ignore nodata trigger

* fix: memory leaks

* fix: configuration issue

* fix: memory issue

* fix: external window issue

* fix: external window issues

* fix: external window placeholder issue

* fix: placeholder function init issues

* fix: memory leak issue

* fix: add debug log

* fix: compile issues

* fix: double free issue

* fix: runner addr update issue

* fix: msg rsp issue

* fix: external window reset issue

* fix: configuration issue

* fix: deploy msg issue

* fix: compile issue

---------

Co-authored-by: huohong <sallyhuo@taosdata.com>

* test: reproduce bugs

* fix: add sliding interval combine case

* test: add cases

* test: add recalc test.

* test: reproduce bugs

* case : add vt ts is null check

* modify case

* bug: submit test_idmp_meters_bug3.py

* test: add test for recalc.

* test: add cases

* fix: error code check

* test: add cases

* fix(stream): scan wal with schema in that version

* add case

* test: add cases

* test: update test case.

* fix: windows compile issues

* add case

* test: add cases (#31845)

* modify case

* fix: reset interpPrev

* test: add test_idmp_meters bug4 and bug3

* add case

* fix(stream): opti wal interface

* fix: remove test_idmp_meters_bug5.py

* test: add cases

* fix(stream): fix ts data fetch for virtual tables

* cancel asan case

* test: update test case.

* test: update test case.

* add case

* test: add cases

* test: add cases

* test: add case test_idmp_meters_bug5.py

* test: update test case.

* fix(stream): tmq error

* test: add cases

* feat: [TS-6100] Restore deleted code in mndSma.c since they are still in use.

* fix(stream): optimize val scan logic

* test: add test_recalc_expired_time.py  to ci.

* test: update test case.

* test: update test case.

* feat: [TS-6100] Fix fill range check

* fix(stream): optimize val scan logic

* add case

* test: modify for partition by %%1

* test: add fun case stream4_sub7

* fix(stream): optimize val scan logic

* add case

* feat: [TS-6100] Rename OPTIONS to STREAM_OPTIONS.

* test: add test for recalc.

* test: use stream_options.

* fix: some cases error.

* test: remove recalc from ci.

* fix: ci case issues (#31880)

* enh: add operator reset func

* fix: merge join reset issue

* fix: memory issues

* fix: add debug assert

* fix: memory issues

* fix: memory leak

* fix: memory issues

* fix taos log miss

* fix: case issue

* fix: case issue

* fix: case issues

* fix: drop dnode issue

* fix: memory issues

* fix: memory issues

* fix: memory leak issues

* fix: recalculate time range issue

* fix: add debug log

* fix: memory issues

* fix: enable case asan

* Update streamlist_for_ci.task

* fix: case asan issue

* fix: stream name issue

* fix: external window compile issues

* fix: deploy memory issue

* fix: ahandle issue

* fix: ahandle issue

* fix: ahandle issue

* fix: virtual table reader list issue

* fix: log info

* fix: msg error

* fix: virtual table addr list issue

* fix: memory issues

* fix: memory leak issue

* fix: memory issues

* fix: memory free issues

* fix: memory issues

* fix: snode deploy issue

* fix: mnode reader issue

* fix: memory issues

* fix: add debug test

* enh: add ignore nodata trigger

* fix: memory leaks

* fix: configuration issue

* fix: memory issue

* fix: external window issue

* fix: external window issues

* fix: external window placeholder issue

* fix: placeholder function init issues

* fix: memory leak issue

* fix: add debug log

* fix: compile issues

* fix: double free issue

* fix: runner addr update issue

* fix: msg rsp issue

* fix: external window reset issue

* fix: configuration issue

* fix: deploy msg issue

* fix: compile issue

* fix: external window idx issue

* fix: ci issues

---------

Co-authored-by: huohong <sallyhuo@taosdata.com>

* fix(stream): fix compilation error

* fix(stream): optimize val scan logic

* test:add test cases

* test: modify case

* fix: external agg error

* test(stream): tobacco scene testing #TD-36514

* test: add stream cases (#31885)

* fix: windows compile issue

* fix: calc timerange

* fix: windows compile issue

* modify case

* fix(stream): compile error

* test: remove one debug test case file

* test: modify

* test: add test cases

* test: reproduce bugs

* test: reproduce bugs

* feat: [TS-6100] Placeholder function should only appera in SELECT and… (#31868)

* feat: [TS-6100] Placeholder function should only appera in SELECT and WHERE and FROM.

* test: update case

---------

Co-authored-by: Simon Guan <guanshengliang@qq.com>

* add example

* add example

* modify case example

* modify case

* test:alter sql

* test: add stream5 case

* fix(stream): get schema error with version

* test: add delete recalc test py.

* test: remove bug cases

* test: stream5 case test passed

* test: add state cases (#31893)

* fix(stream): compile error

* test: modify case

* test: add cases

* test: add test.

* test: update test case.

* chore(test): fix case err

* test: update test case.

* fix: align data get

* fix(stream): fix row index of datablock written into data cache

* fix: put align data

* test: update test case.

* test: add test cases for virtual table

* chore(test): fix case err #TD-36514

* add case

* test: add test for water mark.

* test: add meters bug6 for stream5

* test: add cases (#31903)

* test: add test for recalc.

* feat: [TS-6100] %%trows can only be used when event type is window close.

* test: add precision of database for ms/us/ns

* modify case

* add case

* add case

* test: add test to ci.

* modify case

* fix: ci case issues (#31904)

* enh: add operator reset func

* fix: merge join reset issue

* fix: memory issues

* fix: add debug assert

* fix: memory issues

* fix: memory leak

* fix: memory issues

* fix taos log miss

* fix: case issue

* fix: case issue

* fix: case issues

* fix: drop dnode issue

* fix: memory issues

* fix: memory issues

* fix: memory leak issues

* fix: recalculate time range issue

* fix: add debug log

* fix: memory issues

* fix: enable case asan

* Update streamlist_for_ci.task

* fix: case asan issue

* fix: stream name issue

* fix: external window compile issues

* fix: deploy memory issue

* fix: ahandle issue

* fix: ahandle issue

* fix: ahandle issue

* fix: virtual table reader list issue

* fix: log info

* fix: msg error

* fix: virtual table addr list issue

* fix: memory issues

* fix: memory leak issue

* fix: memory issues

* fix: memory free issues

* fix: memory issues

* fix: snode deploy issue

* fix: mnode reader issue

* fix: memory issues

* fix: add debug test

* enh: add ignore nodata trigger

* fix: memory leaks

* fix: configuration issue

* fix: memory issue

* fix: external window issue

* fix: external window issues

* fix: external window placeholder issue

* fix: placeholder function init issues

* fix: memory leak issue

* fix: add debug log

* fix: compile issues

* fix: double free issue

* fix: runner addr update issue

* fix: msg rsp issue

* fix: external window reset issue

* fix: configuration issue

* fix: deploy msg issue

* fix: compile issue

* fix: external window idx issue

* fix: ci issues

* fix: ci case issues

* fix: drop dnode issue

---------

Co-authored-by: huohong <sallyhuo@taosdata.com>

* fix(stream): ci error

* test: update test case.

* feat: [TS-6100] Disable some failed UT.

* feat: [TS-6100] Fix virtual table

* test: add bug 5.

* test: add test delete recalc to ci.

* test: add bug 6.

* test(stream): tobacco scene #TD-36514

* fix: reqCids,reqCols memory leak in SSTriggerRealtimeContext

Co-authored-by: Tony Zhang <tonyzhang@taosdata.com>

* test: add case stream6

* fix(stream): implement some pending features in trigger task

* modify case

* modify case

* fix: case issues

* modify case

* test: add recalc for warter mark.

* fix(stream): fix count window trigger of virtual tables

* fix(stream): memory leak

* test: fix run err.

* test: add stream6 bug7

* fix: adjust format

* test(stream): tobacco scene testing #TD-36514

* test: change bug7 with update window1 and 2

* test: add test bug 7.

* case: restore write 3 window

* fix: windows compile issue

* fix: notify

* test: add cases

* modify case

* test: update test case.

* test(stream): toobacco scene testing #TD-36514

---------

Co-authored-by: Simon Guan <slguan@taosdata.com>
Co-authored-by: plum-lihui <huili@taosdata.com>
Co-authored-by: Alex Duan <417921451@qq.com>
Co-authored-by: zelv01 <1101510017@qq.com>
Co-authored-by: Jing Sima <simondominic9997@outlook.com>
Co-authored-by: xiangyang guo <66111494+happyguoxy@users.noreply.github.com>
Co-authored-by: wangmm0220 <wangmm0220@gmail.com>
Co-authored-by: Haojun Liao <hjliao@taosdata.com>
Co-authored-by: zyyang90 <zyyang@taosdata.com>
Co-authored-by: Alex Duan <51781608+DuanKuanJun@users.noreply.github.com>
Co-authored-by: facetosea <285808407@qq.com>
Co-authored-by: Simon Guan <guanshengliang@qq.com>
Co-authored-by: huohong <sallyhuo@taosdata.com>
Co-authored-by: Li Hui <52318143+plum-lihui@users.noreply.github.com>
Co-authored-by: Jinqing Kuang <kuangjinqingcn@gmail.com>
Co-authored-by: xiao-77 <berylbao@taosdata.com>
Co-authored-by: Zhixiao Bao <62235797+xiao-77@users.noreply.github.com>
Co-authored-by: happyguoxy <happy_guoxy@163.com>
Co-authored-by: Tony Zhang <34825804+Tony2h@users.noreply.github.com>
Co-authored-by: Tony Zhang <tonyzhang@taosdata.com>
2025-07-16 14:42:16 +08:00
Simon Guan
e8dd9daf11 Merge branch 'main' into merge/mainto3.0 2025-04-19 14:33:11 +08:00
freemine
6267763e85
Freemine.cmake.3.0 (#30663)
* chore(ci): with cmake verbose, temporarily

* chore(cmake): prefer Threads::Threads

* fix(cmake): debug building gtest on ubuntu 20.04 for the moment

* fix(cmake): try adding Threads::Threads

* fix(cmake): debug building gtest on ubuntu 20.04 for the moment

* fix(cmake): revert taosd-ci-build.yml

* fix(cmake): debug building on ubuntu 20.04 for the moment

* fix(cmake): debug building on ubuntu 20.04 for the moment

* fix(cmake): debug building on ubuntu 20.04 for the moment, adding dl right after DEP_ext_libuv

* fix(cmake): debug building on ubuntu 20.04 for the moment, try full run

* fix(cmake): fix building on ubuntu 20.04

* fix(cmake): dl is only valid in non-windows platform

* fix(cmake): dl order

* refactor(cmake): adjust option/cache variables for external dependencies

* refactor(cmake): mv patch files from contrib/ to cmake/

* refactor(cmake): typo

* refactor(cmake): adding cache on ci

* refactor(cmake):
1. ext_lzma2 is only used by Linux
2. fix bug in taosd-ci-build.yml

* enh: adding functionalities of build.sh

* fix(ci): `cmake -B` shall maintain consistency

* refactor(cmake): LOCAL_REPO/LOCAL_URL as cache variable

* refactor(cmake): taosadapter to be built in main build directory rather than .externals

* refactor(cmake): adding rpath for taosadapter, linux now

* refactor(cmake): adding rpath for taosadapter, macos now

* chore(cmake): remove some comments

* debug(ci): bypass TD_EXTERNALS_USE_ONLY

* debug(ci): bypass .externals caching for the moment

* fix(cmake): temporarily use taosadapter/main branch because this branch(freemine.cmake.3.0) has not include taos_fetch_fields_e from upstream

* refactor(cmake): clean GIT_TAG/GIT_SHALLOW pairs

* enh(ci): use build.sh rather than hard-coded in taosd-ci-build.yml, linux for now

* debug(ci): undefined __isoc23_strtoull

* debug(ci): benchmarkTest

* debug(ci): what if use_only = off

* debug(ci): remove .externals to make a refresh build

* debug(ci): back to cache, and ls files of gtest

* debug(ci): remove find coz {} not escaped

* debug(ci): cache key seems missing "matrix.os"

* refactor(ci): fixed cache key and reopen macos/windows

* chore(ci): literally -j4

* chore(ci): Trigger GitHub Actions re-run

* chore(ci): Trigger GitHub Actions re-run

* fix(ci): typo

* chore(ci): JOBS calculated by build.sh itself

* refactor(ci): enable WEBSOCKET in build.sh by default

* refactor(ci): enable WEBSOCKET in build.sh by default, macOS

* chore(cmake): remove obsoletes

* refactor(ci): stop service before running taosd

* chore(ci): `./build.sh install` just install TDengine, you will have to start taosd by `./build.sh start`

* refactor(cmake): adding source code found on http://emfisis.physics.uiowa.edu/Software/C/libargp/

* refactor(cmake): moving jansson/snappy/avro to .externals, and porting BUILD_TEST/WEBSOCKET on Windows

* refactor(cmake): porting linux

* refactor(cmake): porting macos
1. check argp.h
2. re-enable building taosdump

* refactor(cmake): porting linux
1. adjust CMAKE_C/CXX_FLAGS

* refactor(cmake): porting windows, adjust CMAKE_C/CXX_FLAGS

* refactor(cmake): use cmake_parse_arguments in macro INIT_EXT

* refactor(cmake): format ci cache directives

* refactor(cmake): adding comments for ci externals-cache directives

* refactor(cmake): adding check_env.cmake to checking libraries installed on the system

* refactor(cmake): porting linux, make homebrew-installed-libs available

* refactor(cmake): remove BYPRODUCTS from INIT_EXT macro

* refactor(cmake): INC_DIR is oneValueArg

* refactor(cmake): taosdump depends on ext_xz(LZMA)

* refactor(cmake): add copy_pthreadVC3 target on windows

* refactor(cmake): mv taosd-ci-build.yml to tdengine-build.yml

* chore(ci): try to fix yml syntax error

* refactor(cmake): use brew --prefix to get HomeBrew's install path

* refactor(cmake): typo

* debug(ci): build and cache externals first

* debug(ci): adding -Wno-stringop-overread for the moment

* debug(ci): make Threads::Threads public from os target

* debug(ci): make os public

* debug(ci): re-enable start and test

* debug(ci): let it go even if taosBenchmark failed

* debug(ci): copy logic from TDengine/main

* debug(ci): try ./build.sh start/test

* debug(ci): revert to original simple test logic in ci, taosBenchark/taos

* chore(cmake): code-convention and ci-logic

* debug(ci): show versions

* debug(ci): forcefully use specific GIT_TAG by commit-id for taos-connector-rust.git and taosadapter.git

* refactor(cmake): remove empty lines

* debug(ci): typo

* debug(ci): set supportVnodes to 256 before starting taosd

* debug(ci): fix: sudo and pipe

* debug(ci): cat /etc/taos/taos.cfg to check if supportVnodes effective

* debug(ci): cat forceReadConfig to taos.cfg

* debug(ci): adding taos -s "show dnodes"

* debug(ci): print more info

* debug(ci):
1. git log .... in an independant step
2. sleep 3 deliberately

* build: release ver-3.3.6.0

* chore(ci): comment and remove unnecessary code

* refactor(ci): cleanup tools/CMakeLists.txt
1. remove unnecessary or uneffective codes
2. better approach to pass compile flags to go

* chore(cmake): remove unnecessary code

* merge(cmake): porting linux

* merge(cmake): porting macOS

* merge(cmake): porting windows

* merge(cmake): pitfall fix: use literal format string instead

* merge(cmake): ver-3.3.6.0 for both taosadatper and taosws

* merge(cmake): adjust ci for debug purposes

* merge(cmake): add dependenices to make sure native built

* merge(main): link os

* merge(main): revert to main

* chore(cmake): remove freemine'd comments

* chore(cmake): make github ci to run with empty change

* refactor(cmake): remove unnecessaries

* refactor(cmake): remove unnecessaries

* chore(cmake):
1. remove taosudf in build.sh::do_purge
2. packaging taosBenchmark

* chore(cmake):
1. typo corrections
2. add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to bypass compatibility check imposed by latest cmake since 4.0

* chore(cmake): show cmake version

* chore(cmake): add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to bypass compatibility check imposed by latest cmake since 4.0

* chore(cmake): typo

* chore(cmake): remove unnecessaries

* cmake: debug enterprise compilation

* refactor: preparatory work before merging the freemin PR

* refactor(cmake): revert to d91205594a

* refactor(cmake): optimize by adjusting cache key

* chore(cmake): make github ci to run with empty change

* refactor(cmake): move libs3 and azure to external.cmake

* refactor(cmake): porting macOS

* refactor(cmake): move cos to external.cmake

* refactor(cmake): bypass s3/azure/cos on windows for the moment

* refactor(cmake): try find_package(Threads)

* refactor(cmake): add dl/pthread in libs3

* refactor(cmake): enable s3/azure for the moment, hard-coded

* refactor(cmake): adjust BUILD_WITH_ANALYSIS option

* refactor(cmake):
1. enum AVROTYPE => enum enAVROTYPE
2. remove INSTALL(CODE ...) from tools/taos-tools/CMakeLists.txt

* refactor(cmake): portint macOS and typo

* refactor(cmake): ticking external cache key to force refresh external building

* refactor(cmake): remove obsoletes

* refactor(cmake): remove obsoletes

* refactor(cmake): remove obsoletes, contrib/deps-download related

* refactor(cmake): adding build.bat, and use build.bat in .github/workflows/tdengine-build.yml

* refactor(cmake):
1. call .\build.bat
2. remove POST_BUILD which is not valid in this signature of add_custom_command

* refactor(ci): use 'NMake Makefiles JOM'

* refactor(ci): typo

* refactor(ci): debug

* refactor(ci): debug

* refactor(ci): debug

* refactor(ci): use call on windows

* refactor(cmake): move utils/TSZ to contrib/TSZ

* chore(cmake): make github ci to run with empty change

* refactor(cmake): mv cmake.* -> *.cmake and related in CMakeLists.txt

* refactor(cmake): debugging integrating community

* refactor(cmake): debugging integrating community

* chore(cmake): make github ci to run with empty change

* refactor(cmake): revert geos.git back to 3.12.0

* refactor(cmake): revert doc/** to main branch

* refactor(cmake): revert tests/** to main branch, except tests/taosc_test/CMakeLists.txt

* refactor(cmake): revert test/cases/** to main branch

* refactor(cmake): revert test/docs/** to main branch

* refactor(cmake): revert tools/taos-tools/deps/{avro,jansson,libargp,snappy,zlib-1.2.13} to main branch, which need to be removed later

* refactor(ci): revert .github/workflows/{deploy-case-docs.yml,tdengine-doc-build.yml} to main branch

* refactor(cmake): revert tcommon.h and related to main branch

* refactor(cmake): revert test/* stuffs back to main branch

* refactor(cmake): revert libuv.git back to v1.49.2

* refactor(cmake): revert .h/.c and related to main branch

* refactor(cmake): typo format string

* refactor(cmake): typo correction, incorrect use of macro `assert`

* refactor(cmake): adding /wd4028 to bypass thttp.c under enterprise build for the moment

* refactor(cmake):
1. adding some rules to .gitignore for the last resort to save
2. adding source files manually to source/libs/parser/CMakeLists.txt to exclude potential sql.c generated by old build system

* refactor(cmake): add -Wno-unused-result for the moment

* refactor(cmake): adjust target dependencies

* refactor(cmake): tweaking building of mxml

* refactor(cmake): adjust externals CMAKE_ARGS to save compilation time

* refactor(cmake): temporarily use tomchon-patch-3

* refactor(cmake): temporarily adding dumpbin directives

* refactor(cmake): adding NODEFAULTLIB temporarily for debugging purpose

* refactor(cmake): adding NODEFAULTLIB:libcpmt temporarily for debugging purpose

* refactor(cmake): adding NODEFAULTLIB:cpmt temporarily for debugging purpose

* chore(cmake): make github ci to run with empty change

* chore(cmake): make github ci to run with empty change

* refactor(ci): use freemine.debug branch for the moment

* refactor(ci): revert back to use run-tests-on-windows.yml of tomchon-patch-3 branch

* chore(cmake): make github ci to run with empty change

* refactor(cmake): remove temporary debug directives

* refactor(cmake): move cmake_policy(..CMP0135..) to the root of this project

* refactor(cmake): Remove temporary debugging conditional and restore original logic

* chore(cmake): adding -B in army tests

* chore(cmake): make github ci to run with empty change

* chore(cmake): revert: adding -B in army tests

* refactor(cmake):
1. use ver-3.3.6.3 of taosadapter
2. pitfall fix: do not link with taosws for taos shell

* refactor(cmake): revert taosadapter to ver-3.3.6.0

* chore(cmake): adding logging message in more detail

* chore(cmake): adding logging message in more detail

* chore(ci): debugging by using ls -l

* chore(ci): typo

* chore(ci): typo

* refactor(cmake): revert to remove debug code, and taosadapter to ver-3.3.6.3

* refactor(cmake): remove DEP_ext_taosws

* chore(cmake): make github ci to run with empty change

* chore(cmake): make github ci to run with empty change

* chore(cmake): make github ci to run with empty change

* chore(cmake): make github ci to run with empty change

* chore(cmake): typo correction: utils/test/c/sml_test.c

* debug(cmake): test cases debug

* chore(cmake): make github ci to run with empty change

* chore(ci): using tomchon-patch-3 branch for run-tests-on-linux for the moment

* chore(cmake): make github ci to run with empty change

* debug(test): revert utils/test/c/sml_test.c back to tdengine/main branch

* debug(test): adding VERBOSE=1 and gcc --version

* debug(test): revert tests/parallel_test/cases.task back to tdengine/main branch

* debug: add log in run_case.sh

* fix: test log

* fix: docker run privileged

* tes: add debug test in  cases.task

* refactor(cmake): remove ref to \contrib\<dep-name> and ~/.cos-local-{1,2} from CMakeLists.txt(s)

* refactor(cmake): make taosudf link with libtaos.so

* chore(cmake): fix compiler warning as error problem

* refactor(cmake): revert 7d7f03832d

* chore(cmake): only udf.sim and udfpy.sim for the moment

* debug(ci): debug udf.sim for the moment

* debug(ci): debug udf.sim for the moment

* debug(ci): debug udf.sim for the moment

* debug(ci): debug only udf.sim for the moment

* debug(ci): debug only udf.sim for the moment, using tee

* debug(ci): debug only udf.sim for the moment, revert using tee

* debug(ci): debug only udf.sim for the moment, adding TAOS_LIB again

* debug(cmake): adding -rdynamic for the moment

* debug(cmake): re-adding udfpy.sim

* debug(cmake): do NOT run with Sanitizer for udfpy.sim for the moment

* chore(cmake): revert cases.task, and remove ubuntu-20.04 from tdengine-build.yml

* refactor(cmake): using ENABLE_EXPORTS to export symbols in taosudf

* chore(cmake): make github ci to run with empty change

* chore(cmake): remove stuffs for debug purpose and revert

---------

Co-authored-by: support-platform <it@taosdata.com>
Co-authored-by: Simon Guan <slguan@taosdata.com>
Co-authored-by: Simon Guan <guanshengliang@qq.com>
Co-authored-by: haoranchen <haoran920c@163.com>
2025-04-19 14:03:29 +08:00
Simon Guan
7437dd026e Merge branch '3.0' into merge/mainto3.0 2025-04-11 13:47:45 +08:00
xinsheng Ren
7376e8401f
fix: when there are offline dnodes, "show dnode * variables" does not return any output. (#30667) 2025-04-11 11:21:55 +08:00
freemine
9897d85f86
enh(test): adding TD_ALWAYS_ASSERT macro for test cases to use (#30739) 2025-04-10 16:52:55 +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
WANG MINGMING
3d053e2c9b
feat(stream): optimize client logic of creating stream if with history (#30059)
* feat:[TS-5617]use last_row cache mode if creating stream in fill_history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* feat(stream): optimize client logic of creating stream if with history

* fix: heap use after free

* feat: add log

* fix: ci case error

* fix: compile error in windows

* fix: ci case error

* fix: heap user after free

* fix: memory leak

* fix: ci case error

* fix: ci case error

* fix: ci case error

---------

Co-authored-by: yihaoDeng <yhdeng@taosdata.com>
2025-03-14 13:55:52 +08:00
dmchen
80f60449e3 feat/TS-5927-long-password-fix-cases 2025-02-13 10:02:17 +00:00
dmchen
55e12e520b feat/TS-5927-long-password-encrypt-pass 2025-02-13 07:45:42 +00:00
dmchen
48123446d6 feat/TS-5927-long-password-fix-cases 2025-02-13 00:46:08 +00:00
Shengliang Guan
d4ceb37f8c fix: ut errors 2025-01-17 13:44:21 +08:00
Shengliang Guan
25f5b8673f fix: compile errors 2025-01-17 10:53:02 +08:00
Shengliang Guan
e844ced5c1 Merge remote-tracking branch 'freemine/freemine.bypass.specific.test.case.for.community' into fix/contrib 2025-01-17 09:21:05 +08:00
Minglei Jin
d6587af9fd test/parser: use stt trigger 1 2025-01-07 14:03:38 +08:00
Minglei Jin
ad8d38068a test/parser: fix UT for community parser 2025-01-06 17:23:48 +08:00
freemine
4ac3d55709 bypass some specific test case which believes to fail in community version of taos 2025-01-01 16:15:37 +08:00
dapan1121
5503e07181 fix: ut error code 2024-09-05 15:57:23 +08:00
wangmm0220
4d19f48d8a feat:[TS-3718]save slow log file one day one file 2024-08-02 16:29:48 +08:00
wangjiaming0909
d35bdba180 fix parser/planner/nodes ret check ci 2024-07-26 17:57:29 +08:00
wangjiaming0909
4d5cd9cd1a planner/nodes/parser ret check 2024-07-26 17:57:27 +08:00
sima
6a9441528a enh:[TD-31043] Handling return value in builtinsimpl.c 2024-07-23 15:37:17 +08:00