Aklakan commented on code in PR #2884: URL: https://github.com/apache/jena/pull/2884#discussion_r1880681751
########## jena-arq/src/main/java/org/apache/jena/sparql/syntax/syntaxtransform/ExprTransformApplyElementTransform.java: ########## @@ -43,7 +44,15 @@ public ExprTransformApplyElementTransform(ElementTransform transform, boolean al @Override public Expr transform(ExprFunctionOp funcOp, ExprList args, Op opArg) { - Element el2 = ElementTransformer.transform(funcOp.getElement(), transform); + // If the element is null then an attempt is made to obtain it from the algebra. + // A given element takes precedence over the algebra. + Element el1 = funcOp.getElement(); + if (el1 == null) { + Op op = funcOp.getGraphPattern(); + el1 = op == null ? null : OpAsQuery.asElement(op); + } + // ElementTransformer will warn should it happen that null is passed to it. + Element el2 = ElementTransformer.transform(el1, transform, this); Review Comment: This is now the updated actual fix - together with the introduction of `OpAsQuery.asElement`. -- 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: pr-unsubscr...@jena.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@jena.apache.org For additional commands, e-mail: pr-h...@jena.apache.org