Title: [Java] StructVector throws with ExtensionType · Issue #87 · apache/arrow-java · GitHub
Open Graph Title: [Java] StructVector throws with ExtensionType · Issue #87 · apache/arrow-java
X Title: [Java] StructVector throws with ExtensionType · Issue #87 · apache/arrow-java
Description: Describe the bug, including details regarding any error messages, version, and platform. Currently when creating a struct vector with a child being an extension type things throw: @Test public void testStructVectorWithExtensionTypes() { ...
Open Graph Description: Describe the bug, including details regarding any error messages, version, and platform. Currently when creating a struct vector with a child being an extension type things throw: @Test public void...
X Description: Describe the bug, including details regarding any error messages, version, and platform. Currently when creating a struct vector with a child being an extension type things throw: @Test public void...
Opengraph URL: https://github.com/apache/arrow-java/issues/87
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Java] StructVector throws with ExtensionType","articleBody":"### Describe the bug, including details regarding any error messages, version, and platform.\n\nCurrently when creating a struct vector with a child being an extension type things throw:\r\n```java\r\n @Test\r\n public void testStructVectorWithExtensionTypes() {\r\n TestExtensionType.UuidType uuidType = new TestExtensionType.UuidType();\r\n Field uuidField = new Field(\"struct_child\", FieldType.nullable(uuidType), null);\r\n Field structField = new Field(\"struct\", FieldType.nullable(new ArrowType.Struct()), List.of(uuidField));\r\n // throws\r\n StructVector s1 = new StructVector(structField, allocator, null);\r\n // doesn't throw\r\n StructVector s2 = (StructVector) structField.createVector(allocator);\r\n s1.close();\r\n s2.close();\r\n }\r\n```\r\n\r\nI am mainly running into this while trying to create a `TransferPair`.\r\n```java\r\n @Test\r\n public void testStructVectorTransferPairWithExtensionType() {\r\n TestExtensionType.UuidType uuidType = new TestExtensionType.UuidType();\r\n Field uuidField = new Field(\"uuid_child\", FieldType.nullable(uuidType), null);\r\n Field structField = new Field(\"struct\", FieldType.nullable(new ArrowType.Struct()), List.of(uuidField));\r\n\r\n StructVector s1 = (StructVector) structField.createVector(allocator);\r\n TestExtensionType.UuidVector uuidVector = s1.addOrGet(\"uuid_child\", FieldType.nullable(uuidType), TestExtensionType.UuidVector.class);\r\n s1.setValueCount(1);\r\n uuidVector.set(0, new UUID(1, 2));\r\n s1.setIndexDefined(0);\r\n\r\n TransferPair tp = s1.getTransferPair(structField, allocator);\r\n final StructVector toVector = (StructVector) tp.getTo();\r\n assertEquals(s1.getField(), toVector.getField());\r\n assertEquals(s1.getField().getChildren().get(0), toVector.getField().getChildren().get(0));\r\n // also fails but probably another issue\r\n// assertEquals(s1.getValueCount(), toVector.getValueCount());\r\n// assertEquals(s1, toVector);\r\n\r\n s1.close();\r\n toVector.close();\r\n }\r\n```\n\n### Component(s)\n\nJava","author":{"url":"https://github.com/FiV0","@type":"Person","name":"FiV0"},"datePublished":"2024-05-20T10:58:20.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/87/arrow-java/issues/87"}
| 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:c07eac3e-2733-0b87-4a10-eafcaff77b4a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D796:13117A:1364756:18E8E9E:699249AD |
| html-safe-nonce | 32cd21c4d37512176142a7619c82aa6831fc5851fba4bcbc55637988ef7c893b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzk2OjEzMTE3QToxMzY0NzU2OjE4RThFOUU6Njk5MjQ5QUQiLCJ2aXNpdG9yX2lkIjoiOTIxMTAxNzQwNjI4NTIzNjY1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 492847613313bc279e6c7c724433d82415bd94c923b9375171e9a98a2034a358 |
| hovercard-subject-tag | issue:2695806365 |
| 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/87/issue_layout |
| twitter:image | https://opengraph.githubassets.com/604071aa9af22647be409c8d8923d660a61a3d6ffca33245d2d42ad55802eef3/apache/arrow-java/issues/87 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/604071aa9af22647be409c8d8923d660a61a3d6ffca33245d2d42ad55802eef3/apache/arrow-java/issues/87 |
| og:image:alt | Describe the bug, including details regarding any error messages, version, and platform. Currently when creating a struct vector with a child being an extension type things throw: @Test public void... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FiV0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| 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 | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width