You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/04/23 18:11:44 UTC

[GitHub] [calcite] zabetak commented on a change in pull request #1083: [CALCITE-2889] IndexOutOfBoundsException thrown if targetTypes[] contains varargs

zabetak commented on a change in pull request #1083: [CALCITE-2889] IndexOutOfBoundsException thrown if targetTypes[] contains varargs
URL: https://github.com/apache/calcite/pull/1083#discussion_r277806753
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java
 ##########
 @@ -211,7 +211,23 @@ static Expression fromInternal(Expression e, Class<?> targetType) {
       List<Expression> expressions) {
     final List<Expression> list = new ArrayList<>();
     for (int i = 0; i < expressions.size(); i++) {
-      list.add(fromInternal(expressions.get(i), targetTypes[i]));
+      if (targetTypes[i].isArray()) {
+        // only the last type could be variable length argument. All left expressions
 
 Review comment:
   Actually, this is the one comment that I care most. The rest are minor and I could treat them myself I think.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services