You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is still unclear whether temporal literals (DATE(...), TIMESTAMP(...), INTERVAL(...)) are allowed in Basic CQL2 or not.
There are several mentions and examples of dates, timestamps, and intervals in 6.3 and 6.5.
However, 6.2 clearly states:
The rule temporalPredicate is added by requirements class Temporal Operators.
temporalPredicate is the only grammar rule (other than arrayElement) introducing temporalExpression which itself is the only rule introducing temporalLiteral.
I point to #705 where I suggest that using rules to allow/disallow what is accepted what is possble, in addition to overly complicating the grammar, is frought with such difficulties in terms of specifying what each conformance classes allow as additional rules (1), as in that arrayElement example where e.g., if the server conforms to Array Operators, but not Temporal Operators, then actually a temporalExpression is not accepted as an arrayElement. Such combinations then become impossible to specify, in addition to the issues with the impossibility to specify the requirements in terms of runtime type checks of identifier expressions (2).
The text was updated successfully, but these errors were encountered:
Sorry, I just realized that there is a separate temporalInstantExpression that is included in scalarExpression.
This kind of highlights our difficulty with the negated "what is not allowed in Basic CQL2" vs. the positive "what is allowed".
An unaware reader like myself might easily fall in the trap of assuming all "temporal literals" are excluded from basic.
I will update our summary to reflect this.
There are still several mentions of INTERVAL in 6.3.1 and 6.3.2 which are confusing however.
jerstlouis
changed the title
CQL2: Temporal Literals in Basic or not?
CQL2: Clarify that DATE and TIMESTAMP literals are in basic, but not INTERVAL
Jun 29, 2022
Meeting 2022-07-04: Move the INTERVAL examples in the type casts (6.3.2) to the temporal operators req class. Clarify also the reference to interval in 6.3.1 that this requires the temporal operators req. class. Make it very clear that timestamps and dates are supported, but intervals are not.
Move the INTERVAL examples in the type casts (6.3.2) to the temporal operators req class. Clarify also the reference to interval in 6.3.1 that this requires the temporal operators req. class. Make it very clear that timestamps and dates are supported, but intervals are not.
Closes#720
It is still unclear whether temporal literals (
DATE(...)
,TIMESTAMP(...)
,INTERVAL(...)
) are allowed in Basic CQL2 or not.There are several mentions and examples of dates, timestamps, and intervals in 6.3 and 6.5.
However, 6.2 clearly states:
temporalPredicate is the only grammar rule (other than arrayElement) introducing temporalExpression which itself is the only rule introducing temporalLiteral.
See also our summary of CQL2 conformance classes (where we assumed they are not) and related PR #708.
I point to #705 where I suggest that using rules to allow/disallow what is accepted what is possble, in addition to overly complicating the grammar, is frought with such difficulties in terms of specifying what each conformance classes allow as additional rules (1), as in that arrayElement example where e.g., if the server conforms to Array Operators, but not Temporal Operators, then actually a temporalExpression is not accepted as an arrayElement. Such combinations then become impossible to specify, in addition to the issues with the impossibility to specify the requirements in terms of runtime type checks of identifier expressions (2).
The text was updated successfully, but these errors were encountered: