afs commented on code in PR #1631:
URL: https://github.com/apache/jena/pull/1631#discussion_r1030345799
##########
jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterImplicitJoin.java:
##########
@@ -120,10 +120,14 @@ private static Op apply(ExprList exprs, Op subOp) {
// ---- Check if the subOp is the right shape to transform.
Op op = subOp;
- // Special case : deduce that the filter will always "eval unbound"
- // hence eliminate all rows. Return the empty table.
+ // LATERAL : This is not longer true.
+// // Special case : deduce that the filter will always "eval unbound"
+// // hence eliminate all rows. Return the empty table.
+// if (testSpecialCaseUnused(subOp, joins, remaining))
+// return OpTable.empty();
+ // But simply skipping this causes (filter) to become (assign) which
fails as (assign) does not handle errors.
if (testSpecialCaseUnused(subOp, joins, remaining))
- return OpTable.empty();
+ return null;
Review Comment:
Changing the walker is big change - I've tried it before. I'd like to get
this PR in without resorting to that.
I believe the special case is also a potential impact in other places. We
haven't seen it reported because e.g. EXISTS {} is often simple.
Is there any pointers as to when it has been beneficial?
I tried skipping it rather than `return null` but
`TestSemanticEquivalence.implicitJoinEvaluation3` and on a SPARQL WG test fail.
In `implicitJoinEvaluation3`, it only fails on the query string part - the
next two algebra level tests work. This doesn't make sense to me -- the algebra
steps are supposed to cover the possibilities of the SPARQL query.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]