julianhyde commented on a change in pull request #1896: 3877, 3892, 3814 and 
3876
URL: https://github.com/apache/calcite/pull/1896#discussion_r403142494
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/schema/Schemas.java
 ##########
 @@ -224,15 +224,15 @@ public static DataContext createDataContext(
    * array. */
   public static Enumerable<Object[]> enumerable(final FilterableTable table,
       final DataContext root) {
-    return table.scan(root, ImmutableList.of());
+    return table.scan(root, new ArrayList<>());
   }
 
   /** Returns an {@link org.apache.calcite.linq4j.Enumerable} over the rows of
    * a given table, not applying any filters and projecting all columns,
    * representing each row as an object array. */
   public static Enumerable<Object[]> enumerable(
       final ProjectableFilterableTable table, final DataContext root) {
-    return table.scan(root, ImmutableList.of(),
+    return table.scan(root, new ArrayList<>(),
         identity(table.getRowType(root.getTypeFactory()).getFieldCount()));
 
 Review comment:
   See the commit comment. That parameter to `scan` is mutable, always has 
been. The implementation calls `List.removeIf` on it. As of guava-28.2-jre, 
`removeIf` throws even if the list is empty. So, these calls were incorrect to 
pass an immutable list.

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