ValerioDeBlasio opened a new issue #12470:
URL: https://github.com/apache/arrow/issues/12470


   When reading a file with 7M records and groups of 10k records using Pyarrow 
7.0.0, read_table crash without an error, just gave "10: SIGBUS".
   
   If increase the size of groups to 100K it works.
   If use the option use_legacy_dataset to True it works too.
   
   Version 6.0.1 of Pyarrow works fine without the need for the 
use_legacy_dataset option.
   
   ```
   file_name = 'output.parquet'
   schema = pa.schema([
       pa.field('DATE', pa.timestamp('ns')),
       pa.field('OUTCOME', pa.string())
   ])
   parquet_writer = pq.ParquetWriter(file_name,
                                     schema,
                                     compression='snappy',
                                     allow_truncated_timestamps=True,
                                     version='2.6',
                                     data_page_version='2.0'
                                     )
   
   ## create file with 7M records with groups size of 10K records
   for i in range(700):
       tbl = pa.Table.from_arrays([
           pc.cast(pa.array(['2021-01-01T10:10:10'] * 10_000), 
pa.timestamp('ns')),
           pa.array(['OK'] * 10_000),
       ], schema=schema)
       parquet_writer.write_table(tbl)
   
   parquet_writer.close()
   
   
   ### pyarrow version 7.0.0
   pq.read_table(file_name, columns=['OUTCOME']) # fail 10: SIGBUS
   pq.read_table(file_name, columns=['OUTCOME'], use_legacy_dataset=True) # 
works
   
   ### pyarrow version 6.0.1
   pq.read_table(file_name, columns=['OUTCOME']) # works
   pq.read_table(file_name, columns=['OUTCOME'], use_legacy_dataset=True) # 
works
   ```


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