slinkydeveloper commented on a change in pull request #18611:
URL: https://github.com/apache/flink/pull/18611#discussion_r807052617



##########
File path: 
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/FlinkSqlParserImplTest.java
##########
@@ -1529,6 +1529,20 @@ public void testSetReset() {
         sql("RESET 'test-key'").ok("RESET 'test-key'");
     }
 
+    @Test
+    public void testTryCast() {
+        // Note that is expected that the unparsed value has the comma rather 
than AS, because we
+        // don't use a custom SqlNode for TryCast, but we rely on SqlBasicCall
+
+        // Simple types
+        expr("try_cast(a as timestamp)").ok("TRY_CAST(`A` AS TIMESTAMP)");
+        expr("try_cast('abc' as timestamp)").ok("TRY_CAST('abc' AS 
TIMESTAMP)");
+
+        // Complex types
+        expr("try_cast(a as row(f0 int, f1 varchar))")

Review comment:
       Added this specific case

##########
File path: 
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/FlinkSqlParserImplTest.java
##########
@@ -1529,6 +1529,20 @@ public void testSetReset() {
         sql("RESET 'test-key'").ok("RESET 'test-key'");
     }
 
+    @Test
+    public void testTryCast() {
+        // Note that is expected that the unparsed value has the comma rather 
than AS, because we

Review comment:
       Removed it, it's a leftover




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to