You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "waterWang (via GitHub)" <gi...@apache.org> on 2026/08/04 06:38:37 UTC

[PR] fix: ValueWriters.FixedByteBufferWriter should use writeFixed(), not writeBytes() [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] [iceberg]

waterWang opened a new pull request, #17507:
URL: https://github.com/apache/iceberg/pull/17507

   ## Description
   
   For Avro `fixed[N]` fields, the encoder must write fixed-length data
   without a length prefix. `writeBytes()` writes a length-prefixed bytes
   value, which corrupts the Avro binary encoding for `fixed[N]` schema.
   
   ## Fix
   
   Replace `encoder.writeBytes(bytes)` with the correct fixed-length write:
   
   ```java
   byte[] arr = new byte[length];
   bytes.duplicate().get(arr);
   encoder.writeFixed(arr, 0, length);
   ```
   
   ## Testing
   
   - The `Preconditions.checkArgument` validates `bytes.remaining() == length` before the write
   - `duplicate()` creates a view so the original buffer's position is not modified
   - All existing tests should pass (the fix only changes the Avro encoding method, not the data)
   
   Fixes #17501
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] fix: ValueWriters.FixedByteBufferWriter should use writeFixed(), not writeBytes() [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17507:
URL: https://github.com/apache/iceberg/pull/17507#issuecomment-5642153892

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] fix: ValueWriters.FixedByteBufferWriter should use writeFixed(), not writeBytes() [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #17507: fix: ValueWriters.FixedByteBufferWriter should use writeFixed(), not writeBytes() [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT]
URL: https://github.com/apache/iceberg/pull/17507


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] fix: ValueWriters.FixedByteBufferWriter should use writeFixed(), not writeBytes() [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17507:
URL: https://github.com/apache/iceberg/pull/17507#issuecomment-5533890608

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org