Nishuuzz commented on PR #51753:
URL: https://github.com/apache/arrow/pull/51753#issuecomment-6145933211

   Both done.
   
   The list now says `lz4_frame` rather than `lz4`, so the output reads:
   
   ```
   Compression Codecs:
     brotli              : Enabled
     bz2                 : Enabled
     gzip                : Enabled
     lz4_frame           : Enabled
     lz4_raw             : Enabled
     snappy              : Enabled
     zstd                : Enabled
   ```
   
   `Codec.is_available("lz4_frame")` works the same as `"lz4"`, since the alias 
is resolved in `_ensure_compression()`, so this is only a change to what gets 
printed.
   
   For the test I went with `capsys` and checked the codec labels and the 
section headings rather than their status, since as you say the enabled set 
depends on the build. The codec list is compared exactly, which is what pins 
the bug: before this, that list contained `lz4` and `lz4_frame` as separate 
entries and no `lz4_raw`.
   
   One caveat on how far I verified it: I can't build the Cython extension 
here, so I could not run `test_misc.py` itself. What I did instead was 
reproduce `show_info()`'s printing exactly as this branch has it, against the 
installed pyarrow, capture it and run the test's assertions over that text — 
they pass, and the parsed labels come out as the seven above. The real run will 
have to be CI.
   
   Still happy to do the programmatic version you raised originally, which 
needs a new accessor on the Cython side since nothing currently exposes the 
supported codec set. Given I can't compile here, I'd rather not write that 
blind in this PR — I'd suggest landing this and doing it as a follow-up, but 
say the word if you'd prefer it all together.
   


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