Comunica
    Preparing search index...

    A comunica Merge RDF Join Actor.

    Joins two streams that both already arrive sorted on a shared join variable, by reading each side once and always advancing the side that is behind. This does no per-binding lookup and never blocks on a full side, but it is only applicable when both entries advertise a compatible termOrder in their metadata. That is the order in which it compares keys, so an entry that is only sorted in the SPARQL order does not qualify.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Actor that must be registered in the bus before this actor.

    The bus this actor subscribes to.

    canHandleExpression?: boolean

    If this join operator can handle join actions with an expression.

    canHandleOperationRequired?: boolean

    If this join operator can handle join entries with operationModified set to true. This will typically only be true for bind-join-like operators.

    canHandleUndefs: boolean

    If this actor can handle undefs overlapping variable bindings.

    includeInLogs: boolean = true

    If this actor will be logged in the debugger. The physical query plan always includes every join actor that runs.

    limitEntries: number

    Can be used by subclasses to indicate the max or min number of streams that can be joined. 0 for infinity. By default, this indicates the max number, but can be inverted by setting limitEntriesMin to true.

    limitEntriesMin: boolean

    If true, the limitEntries field is a lower limit, otherwise, it is an upper limit.

    logicalType: LogicalJoinType
    mediatorJoinSelectivity: MediatorRdfJoinSelectivity
    name: string

    The name for this actor.

    {<rdf:subject>}
    
    physicalName: string
    pushesBindingsToSource?: boolean

    If this actor pushes bindings of one entry into the source of another entry.

    requiresVariableOverlap?: boolean

    If this join operator must only be used for join entries with (at least partially) common variables.

    ITERATION_COST: 1

    The cost of reading one binding, relative to the 0.8 the non-undef hash join claims per binding.

    ITERATION_COST_ORDERED: 0.8

    The cost of reading one binding when both entries are ordered sources.

    Methods

    • Determine the join key that both entries are sorted on.

      This is the longest common prefix of both orders that consists of shared variables sorted in the same direction. A stream sorted on (a, b, c) is also sorted on (a, b) and on (a), so any such prefix is safe to merge on. An empty result means the entries cannot be merge-joined.

      Parameters

      Returns TermsOrder<Variable>

    • Estimate the cardinality of an equi-join from the cardinalities of its entries.

      Under the usual uniformity assumption, joining two entries on a shared variable divides their cross product by the number of distinct values that variable takes. That number is unknown here, so it is approximated by the cardinality of the largest entry binding the variable, which is its upper bound. For two entries sharing a variable this yields the cardinality of the smaller entry.

      Only the most selective shared variable is taken into account. Entries sharing several variables are more selective still, but applying the approximation once per variable compounds its error, which would collapse the estimate far below the smallest entry.

      Parameters

      Returns number | undefined

      The estimated cardinality, or undefined if the entries share no variables.