INTERVAL literal: Plural qualifier recognized as the interval unit (Pending)¶
Attention
This behavior change is in the 2026_06 bundle.
For the current status of the bundle, refer to Bundle history.
When an INTERVAL literal is
written with the quoted integer followed by an unquoted plural qualifier
(days, hours, minutes, seconds, years, months), Snowflake now recognizes the plural
qualifier as the interval unit. Previously, only singular qualifiers were recognized, and the
plural form was silently parsed as a column alias, producing an incorrect result.
- Before the change:
The plural qualifier is parsed as a column alias, and the INTERVAL literal falls back to its default unit of seconds:
The result is 3 seconds after the input date, not 3 days, and the column is aliased
DAYS.- After the change:
The plural qualifier is recognized as the interval unit, so the literal produces the same value as its singular form:
The affected syntax is an INTERVAL literal used in date-time arithmetic where the qualifier follows the quoted integer without being enclosed in the string:
INTERVAL literals that place the qualifier inside the quoted string (for example,
INTERVAL '3 days') already accept plural forms and are not affected by this change.
How to update your code¶
Review queries that use an INTERVAL literal with an unquoted plural qualifier and take one of the following actions.
-
If the plural qualifier was intended as the interval unit, no action is required. After the change, the query returns the intended result.
-
If the plural qualifier was intended as a column alias, make the alias explicit by adding the
ASkeyword so that the query returns the same result under both the previous and the new behavior:
This change affects INTERVAL literals used with both interval constants and the interval data types preview feature.
Ref: 2359