danielcweeks commented on a change in pull request #205: Adding 
InclusiveManifestEvaluator and ResidualEvaluator
URL: https://github.com/apache/incubator-iceberg/pull/205#discussion_r290894476
 
 

 ##########
 File path: python/iceberg/api/expressions/inclusive_manifest_evaluator.py
 ##########
 @@ -0,0 +1,160 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+from iceberg.api.types import Conversions
+
+from .binder import Binder
+from .expressions import Expressions, ExpressionVisitors
+from .projections import inclusive
+
+
+ROWS_MIGHT_MATCH = True
+ROWS_CANNOT_MATCH = False
+
+
+class InclusiveManifestEvaluator(object):
+
+    def visitor(self):
+        if self.visitors is None:
+            self.visitors = ManifestEvalVistor(self.expr)
+        return self.visitors
+
+    def __init__(self, spec, row_filter, case_sensitive=True):
 
 Review comment:
   I actually don't see anything in PEP 8 that defines the method order, so 
consistency is probably better for now.  However, I believe that we may have an 
issue in that we're only creating one visitor as opposed to just creating a new 
one every time.  
   
   I think the internal `self.stats` is holding state which would prevent this 
from being used in multiple threads.  The easy option is to just always return 
a new instance, the harder option is to figure out the equivalent using 
`threading.local` in python.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to