(
node: sql_expr.Intersect, context: ContextType
)
| 348 | |
| 349 | @register(nodetype=sql_expr.Intersect) |
| 350 | def _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) |
nothing calls this directly
no test coverage detected