Skip to content

fix(expression): skip file pruning when timestamp hours can wrap - #1176

Open
zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:fix/hour-transform-metrics-pruning
Open

zhjwpku wants to merge 1 commit into
apache:mainfrom
zhjwpku:fix/hour-transform-metrics-pruning

Conversation

@zhjwpku

@zhjwpku zhjwpku commented Nov 25, 2026

Copy link
Copy Markdown
Member

The hour transform returns an int32. A large microsecond timestamp can wrap to a negative hour, causing hour(ts) >= 0 to skip a file that contains the epoch.

Use hour bounds for pruning only when both ends of the microsecond timestamp range fit in int32 hours. Nanosecond timestamps always fit, so they can still use a single bound.

The hour transform returns an int32. A large microsecond timestamp can
wrap to a negative hour, causing hour(ts) >= 0 to skip a file that
contains the epoch.

Use hour bounds for pruning only when both ends of the microsecond
timestamp range fit in int32 hours. Nanosecond timestamps always fit,
so they can still use a single bound.

This branch has not been deployed

No deployments
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