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

Function fields

python/pyarrow/tests/strategies.py:203–213  ·  view source on GitHub ↗
(draw, type_strategy=primitive_types, name_strategy=None)

Source from the content-addressed store, hash-verified

201
202@st.composite
203def fields(draw, type_strategy=primitive_types, name_strategy=None):
204 if name_strategy is None:
205 name_strategy = custom_text
206 name = draw(name_strategy)
207 typ = draw(type_strategy)
208 if pa.types.is_null(typ):
209 nullable = True
210 else:
211 nullable = draw(st.booleans())
212 meta = draw(metadata)
213 return pa.field(name, type=typ, nullable=nullable, metadata=meta)
214
215
216def list_types(item_strategy=primitive_types):

Callers 3

struct_typesFunction · 0.70
schemasFunction · 0.70
strategies.pyFile · 0.70

Calls 2

is_nullMethod · 0.80
fieldMethod · 0.45

Tested by

no test coverage detected