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/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:dc882dbb-6b00-792c-c6a8-398921763bf4 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9E66:A1BB5:3312F2A:420A833:6990EB6E |
| html-safe-nonce | 101bded43e4d9b0b5c9d2d7cac80b6179b9bd4b99bc7b735a1cb39fdee164eef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTY2OkExQkI1OjMzMTJGMkE6NDIwQTgzMzo2OTkwRUI2RSIsInZpc2l0b3JfaWQiOiI1MzA1NjY2NzcxNDYxNjYzNTk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 58e0defac80d3339c6471539ecec924b4b346fd0091b6fcc767912589eb35fbc |
| hovercard-subject-tag | pull_request:3212608746 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/files |
| 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-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| 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