pchintar opened a new issue, #9821:
URL: https://github.com/apache/arrow-rs/issues/9821

   ### Description
   
   In `arrow-ipc/src/reader.rs`, the `skip_field` function currently uses a 
wildcard (`_`) match arm to handle remaining `DataType` variants by skipping 
two buffers.
   
   ```rust
   _ => {
       self.skip_buffer();
       self.skip_buffer();
   }
   ```
   
   While this works for current types, it is not robust. If new `DataType` 
variants are added in the future, they will be silently routed through this 
fallback, which may not match their actual buffer layout.
   
   ---
   
   ### Problem
   
   * The wildcard match hides assumptions about buffer layout.
   * New or more complex types (e.g., `ListView`) can be incorrectly handled if 
they are not explicitly matched.
   * This can lead to buffer misalignment and incorrect decoding without 
compile-time detection.
   
   ---
   
   ### Proposed Change
   
   Replace the wildcard arm with an explicit match over all remaining 
`DataType` variants that follow the same layout (null buffer + values buffer).
   
   This ensures:
   
   * All variants are handled explicitly
   * Future additions to `DataType` will trigger a compile-time error instead 
of silently falling back to incorrect behavior
   
   cc @alamb 


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