apache / apache/arrow

[Python] Hive partition columns being forced to dict type

Open
#47,592 5 comments 0 reactions 0 assignees View on GitHub
Component: Python Type: usage
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the bug, including details regarding any error messages, version, and platform.

version: 21.0.0
platform: arm64

When reading data with:
- hive-style partioning
- integer dataframe columns

The partition columns get inferred as int type.

```python
from pyarrow.parquet import read_table

path = "gs://project/data/run_date=2025-09-17/job_id=abc123/0.pq"
dataset = read_table(path)
dataset.read()
```

```
pyarrow.Table
0: uint32
1: uint32
2: uint32
3: uint32
...
99: uint32
run_date: dictionary
job_id: dictionary
```

This causes issues when trying to cast "2025-09-17" to int32 for example

### Component(s)

Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.