TimeFilter.canSkip() use getStatistics() method#715
Merged
JackieTien97 merged 2 commits intoapache:developfrom Jan 29, 2026
Merged
TimeFilter.canSkip() use getStatistics() method#715JackieTien97 merged 2 commits intoapache:developfrom
JackieTien97 merged 2 commits intoapache:developfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an inconsistency in time-filter based skipping of TimeseriesMetadata that may lead to an infinite loop during metadata unpacking.
In the current implementation, the canSkip decision is made using
timeSeriesMetadata.getTimeStatistics(), while the subsequent processing logic relies on getStatistics().
These two statistics sources are not always equivalent.
Specifically, when a value column contains only one measurement, getStatistics() may directly reuse the statistics from the value column’s TimeseriesMetadata, which can produce a different time range from getTimeStatistics().
As a result:
A TimeseriesMetadata that should have been filtered out may pass the canSkip check
Later, during the unpacking of overlapped TimeseriesMetadata, no actual overlap can be found
This causes the unpacking logic to repeatedly retry and enter an infinite loop
The root cause is that:
The time filter overlaps with getTimeStatistics()
But does not overlap with the time range returned by getStatistics()
This PR ensures that the same and consistent time statistics are used throughout the skip decision and subsequent processing, preventing mismatched judgments and eliminating the infinite loop scenario.