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

Function struct_types

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

Source from the content-addressed store, hash-verified

210
211@st.composite
212def struct_types(draw, item_strategy=primitive_types):
213 fields_strategy = st.lists(fields(item_strategy))
214 fields_rendered = draw(fields_strategy)
215 field_names = [field.name for field in fields_rendered]
216 # check that field names are unique, see ARROW-9997
217 h.assume(len(set(field_names)) == len(field_names))
218 return pa.struct(fields_rendered)
219
220
221def 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