Class GroupValuesAndNpsInUnionBranchTransform
java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.BaseTransform
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.GroupValuesAndNpsInUnionBranchTransform
Stabilize rendering for UNION branches that combine a top-level VALUES clause with a negated property set path triple
by preserving an extra grouping block around the branch content.
Rationale: path/NPS rewrites often eliminate an intermediate FILTER or JOIN that caused the RDF4J algebra to mark a
new variable scope. Tests expecting textual stability want the extra braces to persist (e.g., "{ { VALUES ... ?s
!(...) ?o . } } UNION { ... }").
Heuristic (conservative): inside an explicit UNION branch (new scope), if the branch has a top-level IrValues and
also a top-level negated-path triple (IrPathTriple with path starting with '!' or '!^'), wrap the entire branch lines
in an inner IrBGP, resulting in double braces when printed by IrUnion.
-
Field Summary
Fields inherited from class BaseTransform
ANON_PATH_INVERSE_PREFIX, ANON_PATH_PREFIX -
Method Summary
Methods inherited from class BaseTransform
bgpWithLines, branchHasAnonPathBridge, copyAllExcept, fuseAdjacentPtThenPt, fuseAdjacentSpThenPt, fuseAltInverseTailBGP, fusePtSpPtSequence, invertNegatedPropertySet, iri, isAnonPathInverseVar, isAnonPathVar, isConstantIriPredicate, joinPathWithLaterSp, mergeNpsMembers, normalizeCompactNps, orientBareNpsForNext, rewriteContainers, sameVar, sameVarOrValue, unionBranchesAllHaveAnonPathBridge, unionBranchesShareAnonPathVarWithAllowedRoleMapping, unionBranchesShareCommonAnonPathVarName, unionIsExplicitAndAllBranchesScoped, varOrValue
-
Method Details
-
apply
-