Title: [Java] IllegalArgumentException when unsetting TimeStamp*TZVector values · Issue #125 · apache/arrow-java · GitHub
Open Graph Title: [Java] IllegalArgumentException when unsetting TimeStamp*TZVector values · Issue #125 · apache/arrow-java
X Title: [Java] IllegalArgumentException when unsetting TimeStamp*TZVector values · Issue #125 · apache/arrow-java
Description: Describe the bug, including details regarding any error messages, version, and platform. In apache/arrow#35352, there was a timezone check added to the TimeStamp*TZVector.set methods that verified that the *TimeStamp*TZHolder had the sam...
Open Graph Description: Describe the bug, including details regarding any error messages, version, and platform. In apache/arrow#35352, there was a timezone check added to the TimeStamp*TZVector.set methods that verified ...
X Description: Describe the bug, including details regarding any error messages, version, and platform. In apache/arrow#35352, there was a timezone check added to the TimeStamp*TZVector.set methods that verified ...
Opengraph URL: https://github.com/apache/arrow-java/issues/125
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Java] IllegalArgumentException when unsetting TimeStamp*TZVector values","articleBody":"### Describe the bug, including details regarding any error messages, version, and platform.\n\nIn apache/arrow#35352, there was a [timezone check](https://github.com/apache/arrow/blob/main/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroTZVector.java#L164-L166) added to the `TimeStamp*TZVector.set` methods that verified that the `*TimeStamp*TZHolder` had the same timezone as the vector that was being set.\r\n\r\nBefore this change was committed, this snippet to unset the value at an index worked:\r\n```\r\nTimeStampMicroTZVector vector = new TimeStampMicroTZVector(\"vector\", allocator, \"UTC\");\r\nNullableTimeStampMicroTZHolder holder = new NullableTimeStampMicroTZHolder();\r\nvector.setSafe(0, holder);\r\n```\r\nHowever, after the change, it now throws `IllegalArgumentException: holder.timezone: null not equal to vector timezone: UTC` when trying to unset the value in the vector.\r\n\r\nWe currently have a workaround for this issue by explicitly setting `holder.timezone = vector.getTimeZone();` before calling the `setSafe` method. I'm wondering if it is expected behavior to require that `holder.timezone` match the vector's timezone when unsetting the value. It also differs from the `get` behavior which [does not set the timezone on the holder when the vector's value is unset](https://github.com/apache/arrow/blob/main/java/vector/src/main/java/org/apache/arrow/vector/TimeStampMicroTZVector.java#L121-L123). I'm happy to help submit a patch if the existing behavior is indeed unintended.\n\n### Component(s)\n\nJava","author":{"url":"https://github.com/rachel88888","@type":"Person","name":"rachel88888"},"datePublished":"2024-02-02T22:07:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/125/arrow-java/issues/125"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:93f5a9d3-12e5-4291-c9fb-d89e7eb4a131 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83D0:3EE845:6B4C4C2:9664CDE:6A4FC7D1 |
| html-safe-nonce | ecc4e5bad105277f3a3f9c60b6a5a68e8d1cb8ed5df8ad6cf605cf0d730a4af3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0QwOjNFRTg0NTo2QjRDNEMyOjk2NjRDREU6NkE0RkM3RDEiLCJ2aXNpdG9yX2lkIjoiODM4NDYzMjQ4MTI3MDE4Nzk4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b6e29b35e4d62c85db3b4dc0501c470aefe4944a0de257a2026270e7b8c59a7a |
| hovercard-subject-tag | issue:2695808647 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/apache/arrow-java/125/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1323b8329e1e79aa0067d5bd721a9a3dd01f00d3adb522a26739c03480aea1a6/apache/arrow-java/issues/125 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1323b8329e1e79aa0067d5bd721a9a3dd01f00d3adb522a26739c03480aea1a6/apache/arrow-java/issues/125 |
| og:image:alt | Describe the bug, including details regarding any error messages, version, and platform. In apache/arrow#35352, there was a timezone check added to the TimeStamp*TZVector.set methods that verified ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rachel88888 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60b2ae4c725f51e2dac275d0ac5e9233e5967a61cdfaebd732f63da67ff1b71c |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06fb64e1cb36b9a7a2e3f0e6c14af40ef9f439d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width