{"record":{"id":"ac345135a6d0fdf8","repo":"pola-rs/polars","slug":"cannot-use-hive-partitions-with-use-pyarrow-tru","errorCode":null,"errorMessage":"cannot use `hive_partitions` with `use_pyarrow=True`\n\nHint: Pass `pyarrow_options` instead with a 'partitioning' entry.","messagePattern":"cannot use `hive_partitions` with `use_pyarrow=True`\n\nHint: Pass `pyarrow_options` instead with a 'partitioning' entry\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/io/parquet/functions.py","lineNumber":257,"sourceCode":"        issue_unstable_warning(msg)\n\n    # Dispatch to pyarrow if requested\n    if use_pyarrow:\n        if n_rows is not None:\n            msg = \"`n_rows` cannot be used with `use_pyarrow=True`\"\n            raise ValueError(msg)\n        if include_file_paths is not None:\n            msg = \"`include_file_paths` cannot be used with `use_pyarrow=True`\"\n            raise ValueError(msg)\n        if schema is not None:\n            msg = \"`schema` cannot be used with `use_pyarrow=True`\"\n            raise ValueError(msg)\n        if hive_schema is not None:\n            msg = (\n                \"cannot use `hive_partitions` with `use_pyarrow=True`\"\n                \"\\n\\nHint: Pass `pyarrow_options` instead with a 'partitioning' entry.\"\n            )\n            raise TypeError(msg)\n\n        df = _read_parquet_with_pyarrow(\n            source,\n            columns=columns,\n            storage_options=storage_options,\n            pyarrow_options=pyarrow_options,\n            memory_map=memory_map,\n        )\n\n        if row_index is not None:\n            name, offset = row_index\n            df = df.with_row_index(name, offset)\n\n        return df\n\n    # For other inputs, defer to `scan_parquet`\n    lf = scan_parquet(\n        source,","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/py-polars/src/polars/io/parquet/functions.py#L239-L275","documentation":"hive_partitions (with hive_schema) is a native-reader feature for expanding hive-style partition directories into columns. The pyarrow dispatch path does not support it; users must instead supply pyarrow's own partitioning option via pyarrow_options. Polars raises a TypeError with a hint to that effect.","triggerScenarios":"pl.read_parquet(..., use_pyarrow=True, hive_schema=...) on a hive-partitioned dataset.","commonSituations":"Reading hive-partitioned datasets from S3/cloud while forcing pyarrow; switching use_pyarrow=True on without removing hive options.","solutions":["Pass pyarrow_options={'partitioning': 'hive'} (or a pyarrow.partitioning schema) instead of hive_schema","Remove use_pyarrow=True so the native reader handles hive partitions via hive_schema","Drop hive_schema entirely if partition columns are not needed"],"exampleFix":"// before\npl.read_parquet('s3://bucket/ds/', use_pyarrow=True, hive_schema={'date': pl.Date})\n// after\npl.read_parquet('s3://bucket/ds/', use_pyarrow=True, pyarrow_options={'partitioning': 'hive'})","handlingStrategy":"validation","validationCode":"if use_pyarrow and hive_schema is not None:\n    raise ValueError('use pyarrow_options={\"partitioning\": \"hive\"} instead of hive_schema')","typeGuard":null,"tryCatchPattern":"try:\n    df = pl.read_parquet(path, use_pyarrow=True, hive_schema=hs)\nexcept TypeError:\n    df = pl.read_parquet(path, use_pyarrow=True, pyarrow_options={'partitioning': 'hive'})","preventionTips":["For pyarrow dispatch, express hive partitioning via pyarrow_options","Reserve hive_schema for the native reader","Test hive reads on both backends when toggling use_pyarrow"],"tags":["polars","parquet","pyarrow","hive"],"backgroundTag":"conflicting-config-options","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}