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

Function struct_types

python/pyarrow/tests/strategies.py:231–237  ·  view source on GitHub ↗
(draw, item_strategy=primitive_types)

Source from the content-addressed store, hash-verified

229
230@st.composite
231def struct_types(draw, item_strategy=primitive_types):
232 fields_strategy = st.lists(fields(item_strategy))
233 fields_rendered = draw(fields_strategy)
234 field_names = [field.name for field in fields_rendered]
235 # check that field names are unique, see ARROW-9997
236 h.assume(len(set(field_names)) == len(field_names))
237 return pa.struct(fields_rendered)
238
239
240def dictionary_types(key_strategy=None, value_strategy=None):

Callers 1

strategies.pyFile · 0.85

Calls 2

lenFunction · 0.85
fieldsFunction · 0.70

Tested by

no test coverage detected