NobiGo commented on code in PR #4336:
URL: https://github.com/apache/calcite/pull/4336#discussion_r2065710986


##########
testkit/src/main/java/org/apache/calcite/sql/parser/SqlParserTest.java:
##########
@@ -2111,6 +2111,14 @@ void checkPeriodPredicate(Checker checker) {
             + "FROM `DEPT`))) AND (3 = 4))");
   }
 
+  /** Test case for <a 
href="https://issues.apache.org/jira/browse/CALCITE-6986";>[CALCITE-6986]
+   * Parser rejects SQL sources that produce an empty statement list</a>. */
+  @Test public void testEmpty() {
+    sql("").list().ok();

Review Comment:
   I suggest adding new test cases to form a contrast. For example: 
   ```
   sql("").ok()
   sql(" ").ok()
   sql("-- comment").ok()
   ```
   Throwing an exception is also a valid test case.



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