Class CoalesceAdjacentGraphsTransform

java.lang.Object
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.BaseTransform
org.eclipse.rdf4j.queryrender.sparql.ir.util.transform.CoalesceAdjacentGraphsTransform

public final class CoalesceAdjacentGraphsTransform extends BaseTransform
Merge consecutive GRAPH blocks that reference the same graph term into a single GRAPH with a concatenated body. Purpose: - Downstream path fusers work better when a graph body is contiguous, so this pass prepares the IR by removing trivial GRAPH boundaries that arose during building or earlier rewrites. Notes: - Only merges when the graph reference variables/IRIs are identical (by variable name or value). - Preserves other containers via recursion and leaves UNION branch scopes intact.
  • Method Details