mikepersonick commented on a change in pull request #1553:
URL: https://github.com/apache/tinkerpop/pull/1553#discussion_r790773176



##########
File path: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/FilterStep.java
##########
@@ -34,9 +36,22 @@ public FilterStep(final Traversal.Admin traversal) {
     @Override
     protected Traverser.Admin<S> processNextStart() {
         while (true) {
-            final Traverser.Admin<S> traverser = this.starts.next();
-            if (this.filter(traverser))
-                return traverser;
+            try {
+                final Traverser.Admin<S> traverser = this.starts.next();
+                if (this.filter(traverser))
+                    return traverser;
+            } catch (GremlinTypeErrorException ex) {
+                if (this instanceof BinaryReductionStep || 
getTraversal().getParent() == EmptyStep.instance()) {

Review comment:
       The reference implementation doesn't really work like that. There is 
nothing to forward it to. This FilterStep (if it's at the top level of the 
query) has the solution and makes the call whether to filter it or not. It is 
not embedded in a target, the solution has already left the target. If an 
exception is thrown here it goes straight to the client, there is no where 
higher to catch it inside of the query execution layer. For Graph providers 
that push this down obviously that changes.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to