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

Function _union

python/pathway/internals/sql/processing.py:334–346  ·  view source on GitHub ↗
(
    node: sql_expr.Union, context: ContextType
)

Source from the content-addressed store, hash-verified

332
333@register(nodetype=sql_expr.Union)
334def _union(
335 node: sql_expr.Union, context: ContextType
336) -> tuple[table.Table, ContextType]:
337 orig_context = context
338 context = _with_block(node, context)
339 left, _ = _run(node.args.pop("this"), context)
340 right, _ = _run(node.args.pop("expression"), context)
341 ret = left.concat_reindex(right)
342 if node.args.pop("distinct"):
343 ret = ret.groupby(*thisclass.this).reduce(*thisclass.this)
344 assert node.args.pop("expressions", []) == []
345 _check_work_done(node)
346 return ret, orig_context
347
348
349@register(nodetype=sql_expr.Intersect)

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected