simonaubertbd opened a new issue, #47460:
URL: https://github.com/apache/arrow/issues/47460

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Hello,
   
   I have a file with a BYTE_ARRAY in it. it appears this is functionnaly a 
string and it's read as an object because all values are null. If a single 
value is not null, the column becomes a string.
   
   According to https://github.com/apache/parquet-format
   "For example, strings are stored with the primitive type BYTE_ARRAY with a 
STRING annotation. "
   
   other readers such as https://www.parquet-viewer.com/#parquet-online 
retrieve it correctly as varchar or a str..
   
   Here my file, very simple
   
https://github.com/simonaubertbd/temp_upload/blob/main/test_parquet_null.parquet
   
   <img width="874" height="585" alt="Image" 
src="https://github.com/user-attachments/assets/50ee65bb-11f5-4055-abd3-ee64063fbc3e";
 />
   
   and my python code
   ```python
   import pyarrow.parquet as pq
   table2 = 
pq.read_table("C:/Users/qnsv2207/amphi_pipelines/test_parquet_null.parquet").to_pandas()
   print("result in pandas")
   print(table2.dtypes)
   parquet_file = 
pq.ParquetFile("C:/Users/qnsv2207/amphi_pipelines/test_parquet_null.parquet")
   print("physical and logical types")
   for i in range(parquet_file.metadata.num_columns):
       col_meta = parquet_file.metadata.schema.column(i)
       print(col_meta.name, col_meta.physical_type, col_meta.logical_type)
   
   ``` 
   
   Best regards,
   
   Simon
   
   ### Component(s)
   
   Parquet


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

Reply via email to