MCPcopy Create free account
hub / github.com/apache/fory / foo_schema

Function foo_schema

python/pyfory/tests/record.py:110–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108
109
110def foo_schema():
111 bar_struct = pa.struct([("f1", pa.int32()), ("f2", pa.string())])
112 return pa.schema(
113 [
114 ("f1", pa.int32()),
115 ("f2", pa.string()),
116 ("f3", pa.list_(pa.string())),
117 ("f4", pa.map_(pa.string(), pa.int32())),
118 ("f5", pa.list_(pa.int32())),
119 ("f6", pa.int32()),
120 pa.field("f7", bar_struct, metadata={"cls": fory.get_qualified_classname(Bar)}),
121 ],
122 metadata={"cls": fory.get_qualified_classname(Foo)},
123 )

Callers 3

test_encodeFunction · 0.90
test_encodeFunction · 0.90
test_decodeFunction · 0.90

Calls 5

structMethod · 0.80
int32Method · 0.80
schemaMethod · 0.65
fieldMethod · 0.65
stringMethod · 0.45

Tested by 3

test_encodeFunction · 0.72
test_encodeFunction · 0.72
test_decodeFunction · 0.72