LuciferYang commented on PR #3450: URL: https://github.com/apache/parquet-java/pull/3450#issuecomment-4276236424
Hi @wgtmac, thanks for the feedback! I agree that continuing to call `write` after an exception is indeed a misuse. This PR does not aim to change that — the goal is to make such misuse **fail fast** rather than fail silently. Currently, if a user mistakenly continues writing after an error: - All subsequent `write()` calls succeed without any error - `close()` silently skips flushing - Data loss is only discovered much later when reading the file With this change, the misuse is caught immediately with a clear `IOException`, making it much easier to diagnose. This is similar to how `java.io.FileOutputStream` throws `IOException` on `write()` after `close()` — writing to a closed stream is also a misuse, but the JDK still actively rejects it rather than silently accepting data that will never be persisted. If you still feel this is unnecessary, I'm happy to close this PR. WDYT? -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
