bkietz commented on a change in pull request #9130:
URL: https://github.com/apache/arrow/pull/9130#discussion_r555948969
##########
File path: python/pyarrow/tests/test_dataset.py
##########
@@ -2315,6 +2315,29 @@ def test_write_dataset_partitioned(tempdir):
partitioning=partitioning_schema)
[email protected]
[email protected]
+def test_write_dataset_partitioned_dict(tempdir):
+ directory = tempdir / "partitioned"
+ _ = _create_parquet_dataset_partitioned(directory)
+
+ # directory partitioning, dictionary partition columns
+ dataset = ds.dataset(
+ directory,
+ partitioning=ds.HivePartitioning.discover(infer_dictionary=True))
+ target = tempdir / 'partitioned-dir-target'
+ expected_paths = [
+ target / "a", target / "a" / "part-0.feather",
+ target / "b", target / "b" / "part-1.feather"
+ ]
+ partitioning_schema = ds.partitioning(pa.schema([
+ dataset.schema.field('part')]),
+ dictionaries=[pa.array(['a', 'b'])])
Review comment:
For now I've updated the docstring and put a comment in the test to
indicate that dictionaries are required fro parsing dict fields.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]