yanlin-Lynn commented on a change in pull request #1516: [CALCITE-3423] Support 
using CAST operation and BOOLEAN type value in table macro
URL: https://github.com/apache/calcite/pull/1516#discussion_r336826691
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/validate/SqlUserDefinedTableMacro.java
 ##########
 @@ -147,6 +147,8 @@ private static Object getValue(SqlNode right) throws 
NonLiteralException {
         builder2.put(getValue(key), getValue(value));
       }
       return builder2.build();
+    case CAST:
+      return getValue(((SqlCall) right).operand(0));
 
 Review comment:
   Because, `CAST` may happen implicitly, see `testUserDefinedTableFunction4` 
in `TableFunctionTest`.
   We can also support  other type of expressions, like `0 + 1`, or even 
function call `max(1, 2)`, but I think that's another topic.

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