snuyanzin commented on code in PR #26895:
URL: https://github.com/apache/flink/pull/26895#discussion_r2271518122


##########
flink-table/flink-sql-parser/src/main/codegen/templates/Parser.jj:
##########
@@ -3951,6 +3958,43 @@ SqlNode Expression3(ExprContext exprContext) :
     }
 }
 
+/**
+ * Parses a lambda expression.
+ */
+SqlNode LambdaExpression() :

Review Comment:
   can we have a dummy test showing that it fails somewhere on validation 
rather than in runtime?



##########
flink-table/flink-sql-parser/src/main/codegen/templates/Parser.jj:
##########
@@ -4782,8 +4828,14 @@ SqlLiteral DateTimeLiteral() :
         return SqlLiteral.createUnknown("TIMESTAMP", p, s.end(this));
     }
 |
-    <TIMESTAMP> { s = span(); } <WITH> <LOCAL> <TIME> <ZONE> p = 
SimpleStringLiteral() {
-        return SqlLiteral.createUnknown("TIMESTAMP WITH LOCAL TIME ZONE", p, 
s.end(this));
+    LOOKAHEAD(2)
+    <TIME> { s = span(); } <WITH> ( <LOCAL> { local = true; } )? <TIME> <ZONE> 
p = SimpleStringLiteral() {
+        return SqlLiteral.createUnknown("TIME WITH " + (local ? "LOCAL " : "") 
+ "TIME ZONE", p, s.end(this));
+    }
+|
+    LOOKAHEAD(2)
+    <TIMESTAMP> { s = span(); } <WITH> ( <LOCAL> { local = true; } )? <TIME> 
<ZONE> p = SimpleStringLiteral() {
+        return SqlLiteral.createUnknown("TIMESTAMP WITH " + (local ? "LOCAL " 
: "") + "TIME ZONE", p, s.end(this));

Review Comment:
   is it now also supported for Flink?



##########
flink-table/flink-table-planner/src/test/resources/org/apache/flink/table/planner/plan/stream/sql/ValuesTest.xml:
##########
@@ -53,7 +53,8 @@ LogicalProject(a=[$0], b=[$1], c=[$2])
     </Resource>
     <Resource name="optimized exec plan">
       <![CDATA[
-Values(tuples=[[{ 1, 2, 3 }]])
+Calc(select=[1 AS a, b, c])
++- Values(tuples=[[{ 1, 2, 3 }]])

Review Comment:
   I wonder why do we start having extra calc here and for other tests?



##########
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/subquery/SubQuerySemiJoinTest.scala:
##########
@@ -1595,10 +1595,7 @@ class SubQuerySemiJoinTest extends SubQueryTestBase {
     //
     // LogicalFilter lost variablesSet information.
 
-    util.verifyRelPlanNotExpected(sqlQuery1, "joinType=[semi]")
-
-    val sqlQuery2 = "SELECT MAX(a) FROM x GROUP BY 1 HAVING EXISTS (SELECT 1 
FROM y WHERE d < b)"
-    util.verifyRelPlanNotExpected(sqlQuery2, "joinType=[semi]")
+    util.verifyRelPlanNotExpected(sqlQuery, "joinType=[semi]")

Review Comment:
   what is the reason for such change in tests



##########
flink-table/pom.xml:
##########
@@ -78,8 +78,8 @@ under the License.
        </dependencyManagement>
 
        <properties>
-               <calcite.version>1.36.0</calcite.version>
-               <!-- Calcite 1.36.0 depends on 3.1.9,
+               <calcite.version>1.37.0</calcite.version>
+               <!-- Calcite 1.37.0 depends on 3.1.9,

Review Comment:
   this comment is no longer true
   Calcite 1.37 depends on janino 3.1.10
   
https://central.sonatype.com/artifact/org.apache.calcite/calcite-core/1.37.0/dependencies



-- 
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