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

Class JoinResult

python/pathway/internals/joins.py:553–1121  ·  view source on GitHub ↗

Result of a join between tables. Example: >>> import pathway as pw >>> t1 = pw.debug.table_from_markdown(''' ... age owner pet ... 1 10 Alice 1 ... 2 9 Bob 1 ... 3 8 Alice 2 ... ''') >>> t2 = pw.debug.table_from_markdown(''' ...

Source from the content-addressed store, hash-verified

551
552
553class JoinResult(Joinable, OperatorInput):
554 """Result of a join between tables.
555
556 Example:
557
558 >>> import pathway as pw
559 >>> t1 = pw.debug.table_from_markdown('''
560 ... age owner pet
561 ... 1 10 Alice 1
562 ... 2 9 Bob 1
563 ... 3 8 Alice 2
564 ... ''')
565 >>> t2 = pw.debug.table_from_markdown('''
566 ... age owner pet size
567 ... 11 10 Alice 3 M
568 ... 12 9 Bob 1 L
569 ... 13 8 Tom 1 XL
570 ... ''')
571 >>> joinresult= t1.join(t2, t1.pet == t2.pet, t1.owner == t2.owner) # noqa: E501
572 >>> isinstance(joinresult, pw.JoinResult)
573 True
574 >>> pw.debug.compute_and_print(joinresult.select(t1.age, t2.size), include_id=False)
575 age | size
576 9 | L
577 """
578
579 _inner_table: Table
580 _columns_mapping: dict[expr.InternalColRef, expr.ColumnReference]
581 _left_table: Table
582 _right_table: Table
583 _original_left: Joinable
584 _original_right: Joinable
585 _substitution: dict[thisclass.ThisMetaclass, Joinable]
586 _chained_join_desugaring: SubstitutionDesugaring
587 _joined_on_names: StableSet[str]
588 _all_colnames: StableSet[str]
589 _join_mode: JoinMode
590
591 def __init__(
592 self,
593 _context: clmn.Context,
594 _inner_table: Table,
595 _columns_mapping: dict[expr.InternalColRef, expr.ColumnReference],
596 _left_table: Table,
597 _right_table: Table,
598 _original_left: Joinable,
599 _original_right: Joinable,
600 _substitution: dict[thisclass.ThisMetaclass, Joinable],
601 _joined_on_names: StableSet[str],
602 _join_mode: JoinMode,
603 ):
604 super().__init__(_context)
605 self._inner_table = _inner_table
606 self._columns_mapping = _columns_mapping
607 self._left_table = _left_table
608 self._right_table = _right_table
609 self._substitution = {**_substitution, thisclass.this: self}
610 self._joined_on_names = _joined_on_names

Callers 2

filterMethod · 0.70
_table_joinMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected