Pseudo-random hash of its argument. Produces pointer types. Applied column-wise. Example: >>> import pathway as pw >>> t1 = pw.debug.table_from_markdown(''' ... age owner pet ... 1 10 Alice dog ... 2 9 Bob dog ... 3 8 Alic
(
self, *args: Any, optional=False, instance: expr.ColumnReference | None = None
)
| 2631 | |
| 2632 | @trace_user_frame |
| 2633 | def pointer_from( |
| 2634 | self, *args: Any, optional=False, instance: expr.ColumnReference | None = None |
| 2635 | ): |
| 2636 | """Pseudo-random hash of its argument. Produces pointer types. Applied column-wise. |
| 2637 | |
| 2638 | Example: |
| 2639 | |
| 2640 | >>> import pathway as pw |
| 2641 | >>> t1 = pw.debug.table_from_markdown(''' |
| 2642 | ... age owner pet |
| 2643 | ... 1 10 Alice dog |
| 2644 | ... 2 9 Bob dog |
| 2645 | ... 3 8 Alice cat |
| 2646 | ... 4 7 Bob dog''') |
| 2647 | >>> g = t1.groupby(t1.owner).reduce(refcol = t1.pointer_from(t1.owner)) # g.id == g.refcol |
| 2648 | >>> pw.debug.compute_and_print(g.select(test = (g.id == g.refcol)), include_id=False) |
| 2649 | test |
| 2650 | True |
| 2651 | True |
| 2652 | """ |
| 2653 | # XXX verify types for the table primary_keys |
| 2654 | return expr.PointerExpression( |
| 2655 | self, |
| 2656 | *args, |
| 2657 | instance=instance, |
| 2658 | optional=optional, |
| 2659 | ) |
| 2660 | |
| 2661 | @trace_user_frame |
| 2662 | def ix_ref( |
no outgoing calls