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


##########
core/src/main/java/org/apache/calcite/rex/RexBuilder.java:
##########
@@ -1871,10 +1872,28 @@ && areAssignable(arg, Arrays.asList(lower, upper))) {
     switch (point.getKind()) {
     case LITERAL:
       final RexLiteral literal = (RexLiteral) point;
+      if (literal.getValue() instanceof AbstractFlatList) {

Review Comment:
   Can't we use a list here?
    If it is an AbstractFlatList, does it restrict users from using an 
ImmutableIntList to build it?
    Can only include the integer value?



##########
core/src/main/java/org/apache/calcite/rex/RexBuilder.java:
##########
@@ -1871,10 +1872,28 @@ && areAssignable(arg, Arrays.asList(lower, upper))) {
     switch (point.getKind()) {
     case LITERAL:
       final RexLiteral literal = (RexLiteral) point;
+      if (literal.getValue() instanceof AbstractFlatList) {
+        AbstractFlatList list = (AbstractFlatList) literal.getValue();

Review Comment:
   `literal.getValueAs` will remove the cast.



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