Skip to content

Add PARAMETRIC_INTERVAL client capability - #656

Open
azawlocki-sbdt wants to merge 1 commit into
trinodb:masterfrom
azawlocki-sbdt:azawlocki/parametric-interval
Open

azawlocki-sbdt wants to merge 1 commit into
trinodb:masterfrom
azawlocki-sbdt:azawlocki/parametric-interval

Conversation

@azawlocki-sbdt

@azawlocki-sbdt azawlocki-sbdt commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Before version 484, Trino always returned day-time intervals with 3 fractional digits. From v484 it uses 0 to 12 fractional digits (depending on the type's precision) if the client has PARAMETRIC_INTERVAL capability. The parser for intervals is modified to parse the extended format. Tests are also adjusted to the different value ranges and rounding behavior between pre-484 and newer Trino versions.

Non-technical explanation

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

* Return day-time interval values with up to microsecond precision when connected to Trino 484 or later, instead of rounded to milliseconds.
* Report interval types with their precision in `cursor.description()`, for example `INTERVAL DAY(2) TO SECOND(6)`, when connected to Trino 484 or later.

With this capability, Trino sends intervals with 0 to 12 fractional
digits, so interval parsing is adjusted to parse them correctly.
@azawlocki-sbdt
azawlocki-sbdt force-pushed the azawlocki/parametric-interval branch from 23b6b8f to 1f33d4f Compare December 2, 2026 12:16
@azawlocki-sbdt
azawlocki-sbdt marked this pull request as ready for review December 2, 2026 12:19
@findepi
findepi removed their request for review December 2, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant