Skip to content

fix(parser): Use milliseconds when creating literals of type INTERVAL_DAY_TIME#850

Open
mbasmanova wants to merge 1 commit intofacebookincubator:mainfrom
mbasmanova:export-D92179225
Open

fix(parser): Use milliseconds when creating literals of type INTERVAL_DAY_TIME#850
mbasmanova wants to merge 1 commit intofacebookincubator:mainfrom
mbasmanova:export-D92179225

Conversation

@mbasmanova
Copy link
Contributor

@mbasmanova mbasmanova commented Feb 3, 2026

Summary
INTERVAL '1' DAY was incorrectly parsed as the integer 86400. Since INTERVAL_DAY_TIME values are stored in milliseconds, the correct value is 86,400,000.
Fixes queries such as:

VALUES sequence(from_iso8601_date('2020-01-01'), date('2024-09-30'), INTERVAL '1' DAY)

Differential Revision: D92179225

…_DAY_TIME

Summary:
INTERVAL '1' DAY was incorrectly parsed into 86400 integer. Since INTERVAL_DAY_TIME type values store milliseconds, the correct value is 86'400'000.

Fixes queries like

> VALUES sequence(from_iso8601_date('2020-01-01'), date('2024-09-30'), INTERVAL '1' DAY)

Differential Revision: D92179225
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 3, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 3, 2026

@mbasmanova has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92179225.

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants