alippai commented on issue #37428:
URL: https://github.com/apache/arrow/issues/37428#issuecomment-1697493843

   Not sure if this should raise, but also makes it impossible to filter on the 
duplicate column names:
   ```python
   import pyarrow as pa
   import pyarrow.parquet as pq
   
   t = pa.Table.from_arrays([[1,2],[3,4],[5,6]], names=['colA', 'colA', 
'colB']) 
   pq.write_table(t,'/tmp/a.parquet', store_schema=False)
   t2 = pq.read_table('/tmp/a.parquet', schema=pa.schema([pa.field('col1', 
pa.int64()),pa.field('col2', pa.int64()),pa.field('col3', pa.int64())]), 
filters=[('col3', '=', 5)])
   print(t2) # no error, empty result
   ```
   vs
   ```python
   import pyarrow as pa
   import pyarrow.parquet as pq
   
   t = pa.Table.from_arrays([[1,2],[3,4],[5,6]], names=['colA', 'colA', 
'colB']) 
   pq.write_table(t,'/tmp/a.parquet', store_schema=False)
   t2 = pq.read_table('/tmp/a.parquet', schema=pa.schema([pa.field('col1', 
pa.int64()),pa.field('col2', pa.int64()),pa.field('col3', pa.int64())]), 
filters=[('colB', '=', 5)])
   print(t2) # filter applied
   ```


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