You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "olivrlee (via GitHub)" <gi...@apache.org> on 2023/04/25 20:12:30 UTC

[GitHub] [calcite] olivrlee commented on a diff in pull request #3162: CALCITE-5659/ Allow CAST in an INTERVAL literal

olivrlee commented on code in PR #3162:
URL: https://github.com/apache/calcite/pull/3162#discussion_r1176990788


##########
testkit/src/main/java/org/apache/calcite/sql/parser/SqlParserTest.java:
##########
@@ -5223,6 +5223,8 @@ private static Matcher<SqlNode> isCharLiteral(String s) {
         .ok("INTERVAL '1:2:3' HOUR TO SECOND");
     f.sql("interval \"1:2:3\" hour to second")
         .ok("INTERVAL '1:2:3' HOUR TO SECOND");
+    f.sql("interval cast(1 as INT64) year")

Review Comment:
   After some consideration I am going to try completing with a different approach, so I'm moving this back to draft. 
   Ideally it can handle anything between `INTERVAL` and the final token (i.e. `YEAR`), we don't want to be adding to the parser for every shape that comes in one by one. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org