wesm commented on pull request #7757:
URL: https://github.com/apache/arrow/pull/7757#issuecomment-658468591


   OK, writing is disabled but old files can still be read
   
   ```
   n [2]: pq.write_table(table, 'not_allowed.parquet.lz4', compression='lz4')   
                                                                                
                                 
   ---------------------------------------------------------------------------
   OSError                                   Traceback (most recent call last)
   <ipython-input-2-597ef4749b0a> in <module>
   ----> 1 pq.write_table(table, 'not_allowed.parquet.lz4', compression='lz4')
   
   ~/code/arrow/python/pyarrow/parquet.py in write_table(table, where, 
row_group_size, version, use_dictionary, compression, write_statistics, 
use_deprecated_int96_timestamps, coerce_timestamps, allow_truncated_timestamps, 
data_page_size, flavor, filesystem, compression_level, use_byte_stream_split, 
data_page_version, **kwargs)
      1632                 data_page_version=data_page_version,
      1633                 **kwargs) as writer:
   -> 1634             writer.write_table(table, row_group_size=row_group_size)
      1635     except Exception:
      1636         if _is_path_like(where):
   
   ~/code/arrow/python/pyarrow/parquet.py in write_table(self, table, 
row_group_size)
       586             raise ValueError(msg)
       587 
   --> 588         self.writer.write_table(table, row_group_size=row_group_size)
       589 
       590     def close(self):
   
   ~/code/arrow/python/pyarrow/_parquet.pyx in 
pyarrow._parquet.ParquetWriter.write_table()
      1406 
      1407         with nogil:
   -> 1408             check_status(self.writer.get()
      1409                          .WriteTable(deref(ctable), 
c_row_group_size))
      1410 
   
   ~/code/arrow/python/pyarrow/error.pxi in pyarrow.lib.check_status()
        97                 raise IOError(errno, message)
        98             else:
   ---> 99                 raise IOError(message)
       100         elif status.IsOutOfMemory():
       101             raise ArrowMemoryError(message)
   
   OSError: Per ARROW-9424, writing files with LZ4 compression has been 
disabled until implementation issues have been resolved. It is recommended to 
read any existing files and rewrite them using a different compression.
   In ../src/parquet/arrow/writer.cc, line 684, code: 
WriteColumnChunk(table.column(i), offset, size)
   
   In [3]: pq.read_table('example.parquet.lz4').to_pandas()                     
                                                                                
                                  
   Out[3]: 
      f0
   0   1
   1   2
   2   3
   3   4
   4   5
   ```


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to