JunRuiLee commented on PR #565: URL: https://github.com/apache/paimon-rust/pull/565#issuecomment-5030666910
Thanks for the review, both are good catches — fixed. 1. **Binary-array amplification** — `deserialize_binary_array_str/long` now validate that the fixed element region (`count * 8`) fits within the buffer up front (`check_binary_array_fits`), before allocating or iterating. The `long` decoder was the reachable one: null elements skip the per-slot bounds check, so a forged "large count + all-null bitmap + no element slots" input could push `count` `None`s from a tiny buffer. The up-front check closes that; added a regression test with an all-null bitmap and no slots. 2. **`beforeDeletionFiles`** — now rejected with `Unsupported` when non-null instead of being discarded, matching Java `DataSplit#deserialize` which throws in that case (and mirroring the existing `beforeFiles != 0` handling). While there, I also made `isStreaming = true` fail loudly for the same reason: it's a semantic bit Java readers branch on, and this decoder only serves batch splits (`isStreaming = false`), so silently dropping it would be wrong. Updated in `fc0f99c` and `748c7b3`. -- 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]
