pkrefta opened a new issue, #34397:
URL: https://github.com/apache/arrow/issues/34397
### Describe the usage question you have. Please include as many useful
details as possible.
Hi,
I'm trying to create very simple Parquet file that contains None values
```
import pyarrow as pa
import pyarrow.parquet as pq
schema = pa.schema([('field', pa.int64())])
# THIS WORKS
with pq.ParquetWriter('out.parquet', schema=schema) as writer:
table = pa.Table.from_pydict({'field': [None, 1]})
writer.write_table(table)
# THIS DOESN'T
with pq.ParquetWriter('out.parquet', schema=schema) as writer:
table = pa.Table.from_pydict({'field': [None, None]})
writer.write_table(table)
with pq.ParquetWriter('out.parquet', schema=schema) as writer:
table = pa.Table.from_pydict({'field': [None,]})
writer.write_table(table)
```
When I'm trying to write two None values to column it returns an error
```
ValueError: Table schema does not match schema used to create file:
table:
field: null vs.
file:
field: int64
```
Is there any way to write only None values to a column ?
### Component(s)
Parquet, Python
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]