Skip to content

DX-120970 Truncate subseconds beyond milliseconds in castTIMESTAMP_utf8 and castTIME_utf8 (cherry-pick to 26.1)#140

Merged
akravchukdremio merged 2 commits into
dremio:dremio_26.1_18.1.0from
akravchukdremio:DX-120970-26.1
Jun 3, 2026
Merged

DX-120970 Truncate subseconds beyond milliseconds in castTIMESTAMP_utf8 and castTIME_utf8 (cherry-pick to 26.1)#140
akravchukdremio merged 2 commits into
dremio:dremio_26.1_18.1.0from
akravchukdremio:DX-120970-26.1

Conversation

@akravchukdremio

Copy link
Copy Markdown

Cherry-pick of #114 into dremio_26.1_18.1.0 (v26.1).

The Gandiva precompiled time functions castTIMESTAMP_utf8 and castTIME_utf8 reject timestamp and time string literals with more than 3 subsecond digits (beyond millisecond precision), throwing an "Invalid millis" error. Customer T. Rowe Price is impacted on 25.2 and likely also affected on 26.1.

Changes:

  • 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

Risk Assessment

  • Risk: 🟢 LOW — Contained to two C++ files in Gandiva precompiled time library; no schema or API changes
  • Priority: 🔴 BLOCKER — Customer T. Rowe Price impacted; backporting for consistency
  • Blast Radius: castTIMESTAMP_utf8 and castTIME_utf8 in Gandiva precompiled time library only

Conflict Resolution

  • Cherry-pick applied cleanly — no conflicts

Test Plan

  • CI passes on dremio_26.1_18.1.0 branch

JIRA: https://dremio.atlassian.net/browse/DX-120970

…s in `castTIMESTAMP_utf8` and `castTIME_utf8` (apache#48867)

### Rationale for this change

Fixes apache#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
* GitHub Issue: apache#48866

Authored-by: Arkadii Kravchuk <arkadii.kravchuk@dremio.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@akravchukdremio akravchukdremio self-assigned this May 28, 2026
@akravchukdremio akravchukdremio requested a review from lriggs May 28, 2026 09:29
lriggs
lriggs previously approved these changes May 28, 2026
…e brew pin

- Replace unavailable buildjet-8vcpu-ubuntu-2204-arm with ubuntu-24.04-arm
- Add docker-compose shim: ubuntu-24.04-arm ships only Docker Compose v2
  as a plugin (docker compose); archery requires the standalone binary
- Remove brew pin cmake/boost: newer Homebrew (runner >=20260525) resolves
  cmake via the API and hits the cmake cask when pinning; the pins are not
  needed in CI since no brew upgrade runs after the local tap install
- Fix stale comment: remove "Add commentMore actions" GitHub UI artifact
@akravchukdremio

Copy link
Copy Markdown
Author

@akravchukdremio akravchukdremio requested a review from lriggs June 3, 2026 15:59
@akravchukdremio akravchukdremio merged commit 7559af6 into dremio:dremio_26.1_18.1.0 Jun 3, 2026
5 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants