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:1107–1129  ·  view source on GitHub ↗
(pickle_module)

Source from the content-addressed store, hash-verified

1105
1106
1107def test_fragment_scan_options_pickling(pickle_module):
1108 options = [
1109 ds.CsvFragmentScanOptions(),
1110 ds.CsvFragmentScanOptions(
1111 convert_options=pa.csv.ConvertOptions(strings_can_be_null=True)),
1112 ds.CsvFragmentScanOptions(
1113 read_options=pa.csv.ReadOptions(block_size=2**16)),
1114 ds.JsonFragmentScanOptions(),
1115 ds.JsonFragmentScanOptions(
1116 pa.json.ParseOptions(newlines_in_values=False,
1117 unexpected_field_behavior="error")),
1118 ds.JsonFragmentScanOptions(
1119 read_options=pa.json.ReadOptions(use_threads=True, block_size=512)),
1120 ]
1121
1122 if pq is not None:
1123 options.extend([
1124 ds.ParquetFragmentScanOptions(buffer_size=4096),
1125 ds.ParquetFragmentScanOptions(pre_buffer=True),
1126 ])
1127
1128 for option in options:
1129 assert pickle_module.loads(pickle_module.dumps(option)) == option
1130
1131
1132@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