vlsi commented on a change in pull request #1149: [CALCITE-2982] 
SqlItemOperator should throw understandable exception …
URL: https://github.com/apache/calcite/pull/1149#discussion_r273087055
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
 ##########
 @@ -8112,6 +8112,11 @@ public void _testGroupExpressionEquivalenceParams() {
         .type("RecordType(VARCHAR(10) OA) NOT NULL");
   }
 
+  @Test public void testItemOperatorException() {
+    sql("select ^name^[0] from dept")
+        .fails("Cannot apply item operator to 'VARCHAR' for field 
'DEPT.NAME'");
 
 Review comment:
   I'm afraid the message is not quite understandable.
   It is way better than the original, however it is still confusing.
   
   How the error message would like for case like  `select ^(2+2)^[0] from 
dept`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to