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

Method create

python/pathway/internals/groupbys.py:119–147  ·  view source on GitHub ↗
(
        cls,
        table: table.Table,
        grouping_columns: tuple[expr.ColumnReference, ...],
        last_column_is_instance: bool,
        set_id: bool = False,
        sort_by: expr.ColumnReference | None = None,
        _filter_out_results_of_forgetting: bool = False,
        _skip_errors: bool = True,
        _is_window: bool = False,
    )

Source from the content-addressed store, hash-verified

117
118 @classmethod
119 def create(
120 cls,
121 table: table.Table,
122 grouping_columns: tuple[expr.ColumnReference, ...],
123 last_column_is_instance: bool,
124 set_id: bool = False,
125 sort_by: expr.ColumnReference | None = None,
126 _filter_out_results_of_forgetting: bool = False,
127 _skip_errors: bool = True,
128 _is_window: bool = False,
129 ) -> GroupedTable:
130 cols = tuple(arg._to_original()._to_internal() for arg in grouping_columns)
131 col_sort_by = (
132 sort_by._to_original()._to_internal() if sort_by is not None else None
133 )
134 key = (cls.__name__, table, cols, set_id, col_sort_by)
135 if key not in G.cache:
136 result = GroupedTable(
137 _table=table,
138 _grouping_columns=cols,
139 _last_column_is_instance=last_column_is_instance,
140 _set_id=set_id,
141 _sort_by=col_sort_by,
142 _filter_out_results_of_forgetting=_filter_out_results_of_forgetting,
143 _skip_errors=_skip_errors,
144 _is_window=_is_window,
145 )
146 G.cache[key] = result
147 return G.cache[key]
148
149 def _eval(
150 self, expression: expr.ColumnExpression, context: clmn.Context

Callers 1

groupbyMethod · 0.45

Calls 4

tupleFunction · 0.85
GroupedTableClass · 0.85
_to_originalMethod · 0.80
_to_internalMethod · 0.45

Tested by

no test coverage detected