MCPcopy Create free account
hub / github.com/apache/arrow / check_round_trip

Function check_round_trip

python/pyarrow/tests/test_substrait.py:973–976  ·  view source on GitHub ↗
(expr)

Source from the content-addressed store, hash-verified

971 schema = pa.schema([pa.field(name, typ) for name, (typ, _) in fields.items()])
972
973 def check_round_trip(expr):
974 buf = pa.substrait.serialize_expressions([expr], ["test_expr"], schema)
975 returned = pa.substrait.deserialize_expressions(buf)
976 assert schema == returned.schema
977
978 for name, (typ, val) in fields.items():
979 check_round_trip(pc.field(name) == pa.scalar(val, type=typ))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected