Skip to content

Add tag-based query filtering for IoTDB table model - #557

Draft
JackieTien97 wants to merge 1 commit into
masterfrom
ty/query-tag-filter
Draft

Add tag-based query filtering for IoTDB table model#557
JackieTien97 wants to merge 1 commit into
masterfrom
ty/query-tag-filter

Conversation

@JackieTien97

Copy link
Copy Markdown
Collaborator

Summary

  • Add ENABLE_QUERY_TAG_FILTER, QUERY_TAG_INDEX, and QUERY_TAG_VALUE_NUM configuration options with documented defaults and validation.
  • Enumerate the selected TAG distinct values from benchmark-generated devices per target table, honoring REAL_INSERT_RATE; QUERY_TAG_VALUE_NUM=0 selects all actual values in that table, while positive values sample without replacement.
  • Replace the device_id predicate with a TAG IN (...) predicate for Q1–Q12 in the IoTDB 2.0 table model, while keeping device and verification queries exact.
  • Preserve legacy behavior by default and add workload, configuration, TAG-generation, SQL-construction, escaping, and end-to-end tests.

Why

The benchmark previously filtered query workloads only by device_id, so it could not exercise TAG-based filtering in the IoTDB table model. This change makes TAG filtering configurable and guarantees that generated IN values belong to the benchmark-configured value set for the selected query table.

Configuration

  • ENABLE_QUERY_TAG_FILTER=false: enables TAG filtering for IoTDB 2.0 table-model queries.
  • QUERY_TAG_INDEX=0: zero-based TAG column index used by the filter.
  • QUERY_TAG_VALUE_NUM=0: number of distinct values in the IN list; zero means all actual distinct values for the selected TAG in the target table.

Invalid combinations fail fast, including unsupported database/dialect modes and requested counts larger than the available per-table cardinality.

Validation

  • mvn -B spotless:check
  • mvn -B test -pl iotdb-2.0 -am
    • Core: 167 tests passed
    • IoTDB 2.0: 11 tests passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant