Skip to content

Conversation

@alpass163
Copy link
Contributor

  1. Supported DoubleLiteral and LongLiteral comparisons for INT32 and INT64 columns. Implemented precise rounding logic (ceil/floor) for doubles and handled overflow scenarios
  2. introduce tsfile version: 2.2.0-251216-SNAPSHOT, update interfaces provided by tsfile

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a bug in the query filter predicate conversion logic that caused incompatible behavior when comparing INT32 or INT64 columns with double literals. The fix implements proper rounding logic (ceil/floor) for double values and handles overflow scenarios where doubles exceed integer type bounds. Additionally, the PR updates the TSFile dependency to version 2.2.0-251216-SNAPSHOT to accommodate new API interfaces.

Key changes include:

  • Implementation of double-to-integer conversion logic with appropriate rounding semantics for comparison operators
  • Overflow detection for doubles exceeding INT32/INT64 ranges, returning appropriate filters (FalseLiteralFilter or ValueIsNotNullOperator)
  • Support for INT64 literal comparisons with INT32 columns through type promotion
  • TSFile API updates to accommodate new method signatures requiring additional parameters or throwing IOException

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pom.xml Updates TSFile version from 2.2.0-251113-SNAPSHOT to 2.2.0-251216-SNAPSHOT
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/ConvertPredicateToFilterVisitor.java Implements double literal conversion logic for table model predicates with overflow handling
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/expression/visitor/predicate/ConvertPredicateToFilterVisitor.java Implements double literal conversion logic for tree model predicates with overflow handling using BigDecimal
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java Removes unnecessary TSEncoding.valueOf wrapper due to TSFile API change
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/repair/RepairDataFileScanUtil.java Adds null parameter to getDeviceTimeseriesMetadata call for TSFile API compatibility
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/MultiTsFileDeviceIterator.java Adds IOException declarations and null parameter for TSFile API compatibility
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/predicate/TablePredicateConversionTest.java Comprehensive unit tests for table model double literal conversion covering positive/negative values, overflow, and all comparison operators
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/expression/predicate/TreePredicateConversionTest.java Comprehensive unit tests for tree model double literal conversion with parallel coverage to table model
integration-test/src/test/java/org/apache/iotdb/relational/it/query/recent/IoTDBPredicateConversionTableIT.java End-to-end integration tests validating query behavior with double literals for table model
integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBPredicateConversionTreeIT.java End-to-end integration tests validating query behavior with double literals for tree model

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alpass163 alpass163 force-pushed the cyb/fix_double_to_long branch 4 times, most recently from d5f863f to 9e35d6d Compare December 19, 2025 07:43
@JackieTien97 JackieTien97 requested a review from Copilot December 19, 2025 07:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alpass163 alpass163 force-pushed the cyb/fix_double_to_long branch from 9e35d6d to fdf12a0 Compare December 19, 2025 08:01
…or int32 column with double literals in query filter conditions.
@alpass163 alpass163 force-pushed the cyb/fix_double_to_long branch from fdf12a0 to d9cfb41 Compare December 19, 2025 08:18
@JackieTien97 JackieTien97 merged commit 029fbed into apache:master Dec 19, 2025
33 of 34 checks passed
@JackieTien97 JackieTien97 mentioned this pull request Dec 24, 2025
11 tasks
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.

2 participants