afs commented on code in PR #2536:
URL: https://github.com/apache/jena/pull/2536#discussion_r1670222980
##########
jena-arq/src/main/java/org/apache/jena/sparql/engine/main/JoinClassifier.java:
##########
@@ -235,4 +243,85 @@ private static boolean safeModifier(Op op) {
return false ;
return op instanceof OpDistinct || op instanceof OpReduced || op
instanceof OpProject || op instanceof OpList ;
}
+
+ /** Enumeration of the primitive op types in the SPARQL algebra. */
+ private enum Basis {
+ PATTERN,
+ TABLE,
+ PFUNCTION
+ }
+
+ /**
+ * This method checks whether the given op is based on {@link OpTable} or
{@link OpPropFunc}.
+ * If neither is the case then the result is {@link Basis#PATTERN}.
+ * <p>
+ * This method is called for each side of a join from {@link #isLinear(Op,
Op)}.
+ * If that side of the join is a property function then {@link
Basis#PFUNCTION} is returned.
+ *
+ * <p>
+ * The special handling of property functions is due to that
+ * OpJoin(TABLE, PFUNCTION) needs to be linearized to OpSequence(TABLE,
PFUNCTION).
+ *
+ * <p>
+ * This method resolves OpExt to its effective op.
+ */
+ private static Basis getBasis(Op op) {
Review Comment:
This will look better when switch/case/instanceof is available! (Java21, not
Java17)
--
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]