Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-10482

[Python] Specifying compression type on a column basis when writing Parquet not working

    XMLWordPrintableJSON

Details

    Description

      From https://stackoverflow.com/questions/64666270/using-per-column-compression-codec-in-parquet-write-table

      According to the docs, you can specify the compression type on a column-by-column basis, but that doesn't seem to be working:

      In [5]: table = pa.table([[1, 2], [3, 4], [5, 6]], names=["foo", "bar", "baz"])
      
      In [6]: pq.write_table(table, 'test1.parquet', compression=dict(foo='zstd',bar='snappy',baz='brotli'))
      ...
      ~/scipy/repos/arrow/python/pyarrow/_parquet.cpython-37m-x86_64-linux-gnu.so in string.from_py.__pyx_convert_string_from_py_std__in_string()
      
      TypeError: expected bytes, str found
      

      Attachments

        Issue Links

          Activity

            People

              jorisvandenbossche Joris Van den Bossche
              jorisvandenbossche Joris Van den Bossche
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h