Title: GH-343: Fix BaseVariableWidthVector and BaseLargeVariableWidthVector offset buffer serialization by Yicong-Huang · Pull Request #989 · apache/arrow-java · GitHub
Open Graph Title: GH-343: Fix BaseVariableWidthVector and BaseLargeVariableWidthVector offset buffer serialization by Yicong-Huang · Pull Request #989 · apache/arrow-java
X Title: GH-343: Fix BaseVariableWidthVector and BaseLargeVariableWidthVector offset buffer serialization by Yicong-Huang · Pull Request #989 · apache/arrow-java
Description: What's Changed Fix BaseVariableWidthVector/BaseLargeVariableWidthVector IPC serialization when valueCount is 0. Problem When valueCount == 0, setReaderAndWriterIndex() was setting offsetBuffer.writerIndex(0), which means readableBytes() == 0. IPC serializer uses readableBytes() to determine buffer size, so 0 bytes were written to the IPC stream. This crashes IPC readers in other libraries because Arrow spec requires offset buffer to have at least one entry [0]. This is a follow-up to #967 which fixed the same issue in ListVector/LargeListVector. Fix Simplify setReaderAndWriterIndex() to always use (valueCount + 1) * OFFSET_WIDTH for offset buffer's writerIndex. When valueCount == 0, this correctly sets writerIndex to OFFSET_WIDTH, ensuring offset[0] is included in serialization. Testing Added tests for empty VarCharVector and LargeVarCharVector verifying offset buffer has correct readableBytes(). related to #343
Open Graph Description: What's Changed Fix BaseVariableWidthVector/BaseLargeVariableWidthVector IPC serialization when valueCount is 0. Problem When valueCount == 0, setReaderAndWriterIndex() was setting offsetBuffer....
X Description: What's Changed Fix BaseVariableWidthVector/BaseLargeVariableWidthVector IPC serialization when valueCount is 0. Problem When valueCount == 0, setReaderAndWriterIndex() was setting offsetBuf...
Opengraph URL: https://github.com/apache/arrow-java/pull/989
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:1129ac82-c4cb-4678-a95e-fb4914c56e07 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | A098:1478FE:2AFC1A5:36E51A7:69912ECB |
| html-safe-nonce | 92ace6941ce8a81ee95939d71ea76c0fa9dcfa81435e20d7a760d1535e13f30e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDk4OjE0NzhGRToyQUZDMUE1OjM2RTUxQTc6Njk5MTJFQ0IiLCJ2aXNpdG9yX2lkIjoiMjIzMjMxNzQzNTc3OTgyMTI1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8f74e9e794cbd1a553a59af56089acab5ffaaf7d89249e727e4b0361d2ab128c |
| hovercard-subject-tag | pull_request:3212608746 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/apache/arrow-java/pull/989/checks |
| twitter:image | https://avatars.githubusercontent.com/u/17627829?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/17627829?s=400&v=4 |
| og:image:alt | What's Changed Fix BaseVariableWidthVector/BaseLargeVariableWidthVector IPC serialization when valueCount is 0. Problem When valueCount == 0, setReaderAndWriterIndex() was setting offsetBuffer.... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-cache |
| go-import | github.com/apache/arrow-java git https://github.com/apache/arrow-java.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 893682219 |
| octolytics-dimension-repository_nwo | apache/arrow-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 893682219 |
| octolytics-dimension-repository_network_root_nwo | apache/arrow-java |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width