HippoBaro opened a new pull request, #11838:
URL: https://github.com/apache/arrow-rs/pull/11838

   # Which issue does this PR close?
   
   <!--
   It is not necessary to raise an issue, but it is encouraged if it is a 
non-trivial
   enhancement/bug.
   
   If this PR relates to an existing issue, but does not fully resolve it, 
please change
   the wording below from "Closes #NNN" to "Relates to #NNN" or "Part of #NNN" 
to avoid
   false closing an issue.
   -->
   
   - Closes #11837
   - Contributes to #9731
   - Part of #11273
   
   # Rationale for this change
   
   <!--
   Why are you proposing this change? If this is already explained clearly in 
the
   issue then this section is not needed. Explaining clearly why changes are 
proposed
   helps reviewers understand your changes and offer better suggestions for 
fixes.
   
   Please try to explain the problem you are trying to solve in terms of the 
user-visible
   behavior, rather than the implementation.
   -->
   
   See #11837. Structural mismatches between the input batch, declared schemas, 
and column writers should produce descriptive errors rather than silently 
ignore columns or panic. Map-key schema constraints should also be enforced 
when an explicit Parquet schema bypasses Arrow-to-Parquet conversion.
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is
   sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   Reject mismatches between batch columns, planned Parquet leaves, physical 
column writers, and CDC chunkers instead of silently truncating zipped 
iteration or panicking on missing writers.
   
   Derive per-field leaf ranges from the target Arrow schema and verify the 
Arrow/Parquet leaf counts when creating column writers. Check batch, writer, 
and chunker counts before updating row-group accounting, and validate each 
field's actual leaf count before dispatching its writes. Preserve compatible 
dense, dictionary, and run-end encoded representations.
   
   Validate map-key schemas when creating an Arrow writer, including when an 
explicitly supplied Parquet schema bypasses Arrow-to-Parquet conversion.
   
   # Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they
   covered by existing tests, if so identify these tests)?
   
   If this PR claims a performance improvement, please include evidence such as
   benchmark results.
   
   DO NOT simply paste a list of commands ran to verify the code; this is what 
our
   CI is for and it pollutes the PR. ONLY explain if testing was included with 
this
   PR, or why it wasn't.
   -->
   
   Add regression coverage for shape mismatches, invalid map-key schemas, and 
reachable versus masked or unreferenced map-key nulls. All tests passing.
   
   # Are there any significant user-facing changes?
   
   <!--
   Significant user-facing changes include:
   - Breaking public API change
   - Significant change to existing functionality (e.g. function returns 
something different)
   
   These need to be explicitly called out to ensure we have proper 
documentation if
   required and to ensure we follow proper semantic versioning.
   
   DO NOT restate the changes of this PR; if a bug was fixed and already 
explained
   above, we don't need this to be restated as a user-facing change.
   -->
   
   No public API changes. Invalid schema or column-count combinations that were 
previously accepted, silently ignored, or caused a panic now return descriptive 
errors.


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