TDengine/include/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
..
function.h feat: support any/some/all/exists with subqueries (#34632) 2026-03-06 14:45:30 +08:00
functionMgt.h feat(stream): implement idle trigger for stream partitions (#34902) 2026-03-24 10:14:40 +08:00
functionResInfo.h enh:[TD-32189] Add validation to prevent changes to resultinfo structure. 2024-10-12 15:14:59 +08:00
taosudf.h feat: support BLOB data type (#31704) 2025-07-17 14:17:47 +08:00
tudf.h fix: failed to start udfd (#30710) 2025-04-09 18:41:43 +08:00