Skip to content

Conversation

@akravchukdremio
Copy link

@akravchukdremio akravchukdremio commented Jan 15, 2026

Rationale for this change

Fixes #48866. The Gandiva precompiled time functions castTIMESTAMP_utf8 and castTIME_utf8 currently reject timestamp and time string literals with more than 3 subsecond digits (beyond millisecond precision), throwing an "Invalid millis" error. This behavior is inconsistent with other implementations.

What changes are included in this PR?

  • Fixed castTIMESTAMP_utf8 and castTIME_utf8 functions to truncate subseconds beyond 3 digits instead of throwing an error
  • Updated tests. Replaced error-expecting tests with truncation verification tests and added edge cases

Are these changes tested?

Yes

Are there any user-facing changes?

No

…s in `castTIMESTAMP_utf8` and `castTIME_utf8`
@github-actions github-actions bot added the awaiting review Awaiting review label Jan 15, 2026
@github-actions
Copy link

⚠️ GitHub issue #48866 has been automatically assigned in GitHub to PR creator.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++][Gandiva] castTIMESTAMP_utf8 and castTIME_utf8 should truncate subseconds beyond milliseconds, not reject them

1 participant