[
https://issues.apache.org/jira/browse/CALCITE-5659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17713682#comment-17713682
]
TJ Banghart commented on CALCITE-5659:
--------------------------------------
I wonder if it is better to ease the requirement thatÂ
{{Expression(ExprContext.ACCEPT_SUB_QUERY)}} be wrapped in parentheses than to
have {{CAST}} be an exception to the rule.
Ideally we'd avoid having to add other function calls as they come up. That
said, we'd still be able to wrap expressions so this concern is probably not
something to worry about.
> Allow CAST in an INTERVAL definition
> -------------------------------------
>
> Key: CALCITE-5659
> URL: https://issues.apache.org/jira/browse/CALCITE-5659
> Project: Calcite
> Issue Type: Bug
> Reporter: Oliver Lee
> Assignee: Oliver Lee
> Priority: Major
>
> Running queries that contain a CAST as part of the INTERVAL definition is
> throwing a parser error.
> i.e.
> {{INTERVAL CAST(5 as int64) YEAR}}
> We can make parser changes to allow the Cast function tokens to be accepted
--
This message was sent by Atlassian Jira
(v8.20.10#820010)