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

   ## Purpose
   
   The CSV and JSON format readers convert BOOLEAN fields with
   `Boolean.parseBoolean`, which maps every string other than `"true"` to
   `false` and never fails. So `1`, `yes`, `t` or garbage silently read as
   `false`, while every other scalar routes an unparseable value to the
   malformed path: CSV numerics return invalid so `csv.mode` can null/drop/fail
   them, and JSON numerics throw so `json.ignore-parse-errors` can null them.
   Same silent-wrong-data class as the recent #9556 fix for CSV PERMISSIVE mode.
   
   ## Change
   
   Parse only case-insensitive `true`/`false`. The writers emit
   `value.toString()`, so Paimon-written tables still round-trip. CSV returns
   `Pair.of(false, null)` for anything else; JSON throws so the existing
   parse-error handling decides null-vs-throw.
   
   ## Tests
   
   - `CsvFileFormatTest.testCsvParserParseBoolean` pins the parse contract.
   - `JsonFileFormatTest.testIgnoreParseErrorsNullsMalformedBoolean` reads a 
file
     where a malformed boolean is nulled instead of silently `false`.
   - Both fail without the production change.
   
   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