MCPcopy
hub / github.com/pathwaycom/pathway / _intersect

Function _intersect

python/pathway/internals/sql/processing.py:350–364  ·  view source on GitHub ↗
(
    node: sql_expr.Intersect, context: ContextType
)

Source from the content-addressed store, hash-verified

348
349@register(nodetype=sql_expr.Intersect)
350def _intersect(
351 node: sql_expr.Intersect, context: ContextType
352) -> tuple[table.Table, ContextType]:
353 orig_context = context
354 context = _with_block(node, context)
355 left, _ = _run(node.args.pop("this"), context)
356 right, _ = _run(node.args.pop("expression"), context)
357
358 left = left.groupby(*thisclass.this).reduce(*thisclass.this)
359 right = right.groupby(*thisclass.this).reduce(*thisclass.this)
360 ret = left.intersect(right)
361 assert node.args.pop("distinct")
362 assert node.args.pop("expressions", []) == []
363 _check_work_done(node)
364 return ret, orig_context
365
366
367@register(nodetype=sql_expr.Join)

Callers

nothing calls this directly

Calls 6

_with_blockFunction · 0.85
_check_work_doneFunction · 0.85
intersectMethod · 0.80
_runFunction · 0.70
reduceMethod · 0.45
groupbyMethod · 0.45

Tested by

no test coverage detected