rdblue commented on a change in pull request #1139:
URL: https://github.com/apache/iceberg/pull/1139#discussion_r447156253
##########
File path:
parquet/src/main/java/org/apache/iceberg/parquet/ParquetDictionaryRowGroupFilter.java
##########
@@ -116,7 +116,18 @@ private boolean eval(MessageType fileSchema, BlockMetaData
rowGroup,
}
}
- return ExpressionVisitors.visitEvaluator(expr, this);
+ try {
+ return ExpressionVisitors.visitEvaluator(expr, this);
+
+ } finally {
+ // allow temporary state to be collected because this is in a
thread-local
Review comment:
Good question. I think we could remove the thread-local. The idea was
originally to avoid the `Expression` handling that is currently done in the
constructor: `Binder.bind(struct, Expressions.rewriteNot(unbound),
caseSensitive)`.
We could remove the thread-local since it is just avoiding a simple object
allocation that's probably not worth it. On the other hand, we could also keep
it and simply clear all of this state instead of allocating new containers each
time. I'd probably opt for that to avoid lots of object creation. What do you
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]