jackylee-ch opened a new pull request, #9853:
URL: https://github.com/apache/paimon/pull/9853

   ### Purpose
   
   A text file is always written through the configured codec 
(`AbstractTextFileWriter:44`), while the reader recovers the codec from the 
file name alone; `file.compression` is not consulted on read. 
`DataFilePathFactory.isTextFormat` listed only `json` and `csv`, so 
`file.format=text` wrote zstd bytes into `data-<uuid>-0.text` and read them 
back as UTF-8 lines — garbage rows, no exception.
   
   Format tables are unaffected (`formatTableFileCompression()` returns `none` 
for text); managed tables hit it with no configuration at all, since 
`file.compression` defaults to `zstd`.
   
   Files already written compressed under the old name stay unreadable; this 
changes new writes only.
   
   ### Tests
   
   `DataFilePathFactoryTest#testTextFormatCarriesTheCompressionExtension`. 
Reverting the fix:
   
   ```
   Expecting actual: ...-0.text
   to end with: .text.zst
   ```
   
   `org.apache.paimon.io.*Test`: 113 run, 0 failures.
   
   Written with Claude Code; verification is mine.
   


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