op:exists-join( $leftPlan as map:map, $rightPlan as map:map, [$keys as map:map*], [$condition as map:map?] ) as map:map
This method is a filtering join that filters based on whether the join exists or not but doesn't add any columns.
It filters the left row set to the rows that have a join in the right row set.
Parameters | |
---|---|
$leftPlan | The row set from the left view. |
$rightPlan | The row set from the right view. |
$keys | The equijoin from one or more calls to the op:on function. |
$condition | A boolean expression that filters the join output rows. |
(: It filters out {'r1':1, 'k1':'a'} in p1 as value 'a' exists in column 'k2' of p2 :) xquery version "1.0-ml"; import module namespace op="http://marklogic.com/optic" at "/MarkLogic/optic.xqy"; op:from-literals(( map:entry("r1", 1) => map:with("k1", "a"), map:entry("r1", 2) => map:with("k1", "b") )) => op:exists-join( op:from-literals(( map:entry("r2", 3) => map:with("k2", "a"), map:entry("r2", 4) => map:with("k2", "c") )), op:on("k1", "k2") ) => op:result()