You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/05/27 03:19:45 UTC

[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #983: Convert date and timestamp values in generics

rdblue commented on a change in pull request #983:
URL: https://github.com/apache/incubator-iceberg/pull/983#discussion_r430016878



##########
File path: data/src/main/java/org/apache/iceberg/data/TableScanIterable.java
##########
@@ -161,7 +161,10 @@ public boolean hasNext() {
 
           if (task.residual() != null && task.residual() != Expressions.alwaysTrue()) {
             Evaluator filter = new Evaluator(projection.asStruct(), task.residual(), caseSensitive);
-            this.currentIterator = Iterables.filter(reader, filter::eval).iterator();
+            this.currentIterator = Iterables.filter(reader, record -> {
+              InternalRecordWrapper wrapperRecord = new InternalRecordWrapper(record.struct()).wrap(record);

Review comment:
       The wrapper can be reused so it should be moved outside the predicate. The predicate just needs to be this:
   
   ```java
     record -> filter.eval(wrapper.wrap(record))
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org