MCPcopy Create free account
hub / github.com/pathwaycom/pathway / _normalize

Method _normalize

python/pathway/internals/table_slice.py:139–153  ·  view source on GitHub ↗
(self, arg: str | ColumnReference)

Source from the content-addressed store, hash-verified

137 return self
138
139 def _normalize(self, arg: str | ColumnReference):
140 if isinstance(arg, ColumnReference):
141 if isinstance(arg.table, ThisMetaclass):
142 if arg.table != this:
143 raise ValueError(
144 f"TableSlice expects {repr(arg.name)} or this.{arg.name} argument as column reference."
145 )
146 else:
147 if arg.table != self._table:
148 raise ValueError(
149 "TableSlice method arguments should refer to table of which the slice was created."
150 )
151 return arg.name
152 else:
153 return arg

Callers 3

__getitem__Method · 0.95
withoutMethod · 0.95
renameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected