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

Function test_fragment_scan_options_pickling

python/pyarrow/tests/test_dataset.py:1113–1135  ·  view source on GitHub ↗
(pickle_module)

Source from the content-addressed store, hash-verified

1111
1112
1113def test_fragment_scan_options_pickling(pickle_module):
1114 options = [
1115 ds.CsvFragmentScanOptions(),
1116 ds.CsvFragmentScanOptions(
1117 convert_options=pa.csv.ConvertOptions(strings_can_be_null=True)),
1118 ds.CsvFragmentScanOptions(
1119 read_options=pa.csv.ReadOptions(block_size=2**16)),
1120 ds.JsonFragmentScanOptions(),
1121 ds.JsonFragmentScanOptions(
1122 pa.json.ParseOptions(newlines_in_values=False,
1123 unexpected_field_behavior="error")),
1124 ds.JsonFragmentScanOptions(
1125 read_options=pa.json.ReadOptions(use_threads=True, block_size=512)),
1126 ]
1127
1128 if pq is not None:
1129 options.extend([
1130 ds.ParquetFragmentScanOptions(buffer_size=4096),
1131 ds.ParquetFragmentScanOptions(pre_buffer=True),
1132 ])
1133
1134 for option in options:
1135 assert pickle_module.loads(pickle_module.dumps(option)) == option
1136
1137
1138@pytest.mark.parametrize('paths_or_selector', [

Callers

nothing calls this directly

Calls 4

extendMethod · 0.80
loadsMethod · 0.80
dumpsMethod · 0.80

Tested by

no test coverage detected