willtemperley commented on issue #3307:
URL: https://github.com/apache/parquet-java/issues/3307#issuecomment-3263670018

   That would be make sense, but what would be written to the DataPageHeader in 
that case? Both `definition_level_encoding` and `repetition_level_encoding` are 
required fields.
   
   I noticed that pyarrow writes RLE when there are no rep levels. It only 
writes Parquet 2 though I believe. Demonstrated by:
   
   ```python
   import pyarrow as pa
   import pyarrow.parquet as pq
   
   # 1. Create a Parquet file with a required, non-repeated column
   table = pa.table({"x": pa.array([1, 2, 3], type=pa.int32())})
   pq.write_table(table, "test.parquet", version="2.6", use_dictionary=False)
   ```
   
   Which creates:
   
   
[test.parquet.zip](https://github.com/user-attachments/files/22195438/test.parquet.zip)
   
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to