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

Method pointer_from

python/pathway/internals/table.py:2633–2659  ·  view source on GitHub ↗

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
    )

Source from the content-addressed store, hash-verified

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(

Callers 15

with_id_fromMethod · 0.95
ix_refMethod · 0.95
_louvain_levelFunction · 0.45
smart_fuzzy_matchFunction · 0.45
test_skipsFunction · 0.45
test_twoclass_methodFunction · 0.45
test_twoclass_method2Function · 0.45
test_pointer_eqFunction · 0.45
test_pointer_orderFunction · 0.45
test_flatten_simpleFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_skipsFunction · 0.36
test_twoclass_methodFunction · 0.36
test_twoclass_method2Function · 0.36
test_pointer_eqFunction · 0.36
test_pointer_orderFunction · 0.36
test_flatten_simpleFunction · 0.36
test_skip_list_shortFunction · 0.36
test_linked_list_lenFunction · 0.36
test_linked_list_forwardFunction · 0.36