MCPcopy Index your code
hub / github.com/pathwaycom/pathway / target

Function target

python/pathway/tests/test_py_object_wrapper.py:241–261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239 res: str
240
241 def target():
242 t = pw.io.csv.read(input_path, schema=InputSchema, mode="static")
243 z = t.copy()
244
245 serializer = get_serializer(serialization)
246
247 @pw.udf
248 def create_simple(a: str) -> pw.PyObjectWrapper[SimpleStr]:
249 return pw.wrap_py_object(SimpleStr(a), serializer=serializer)
250
251 @pw.udf
252 def use_python_object(a: pw.PyObjectWrapper[SimpleStr], x: str) -> str:
253 return a.value.concat(x)
254
255 res = (
256 t.with_columns(s=create_simple(pw.this.a))
257 .join(z, left_instance=pw.left.instance, right_instance=pw.right.instance)
258 .select(res=use_python_object(pw.left.s, pw.right.a))
259 )
260 pw.io.csv.write(res, output_path)
261 run()
262
263 @dataclass
264 class Checker:

Callers 1

target_wrappedFunction · 0.70

Calls 9

runFunction · 0.90
get_serializerFunction · 0.85
create_simpleFunction · 0.85
with_columnsMethod · 0.80
writeMethod · 0.80
use_python_objectFunction · 0.70
copyMethod · 0.45
selectMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected