TDengine/source/libs/function
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
..
inc feat: support any/some/all/exists with subqueries (#34632) 2026-03-06 14:45:30 +08:00
src feat(stream): implement idle trigger for stream partitions (#34902) 2026-03-24 10:14:40 +08:00
test Freemine.cmake.3.0 (#30663) 2025-04-19 14:03:29 +08:00
CMakeLists.txt fix: storage encrypt (#34426) 2026-02-05 14:46:51 +08:00