danny0405 commented on code in PR #2844:
URL: https://github.com/apache/calcite/pull/2844#discussion_r913752126


##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -1564,6 +1564,50 @@ public void _testLikeAndSimilarFails() {
         .fails("No match found for function signature FOO..");
   }
 
+  @Test void testInvalidTableFunction() {
+    // A table function at most have one input table with row semantics
+    sql("select * from table(^invalid(table orders, table emp)^)")
+        .fails("A table function at most has one input table with row 
semantics."
+            + " Table function 'INVALID' has multiple input tables with row 
semantics");
+    // Only tables with set semantics may be partitioned
+    sql("select * from table(^score(table orders partition by productid)^)")
+        .fails("Only tables with set semantics may be partitioned."
+            + " Invalid PARTITION BY clause in the 0-th operand of table 
function 'SCORE'");
+    // Only tables with set semantics may be ordered

Review Comment:
   We need some tests for multiple partition/ordering keys.
   We need some tests for multiple table params.



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