[
https://issues.apache.org/jira/browse/ARROW-1816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16271063#comment-16271063
]
ASF GitHub Bot commented on ARROW-1816:
---------------------------------------
icexelloss commented on a change in pull request #1330: ARROW-1816: [Java]
Resolve new vector classes structure for timestamp, date and maybe interval
URL: https://github.com/apache/arrow/pull/1330#discussion_r153844744
##########
File path:
java/vector/src/main/codegen/templates/AbstractPromotableFieldWriter.java
##########
@@ -42,6 +43,8 @@
* @param type the type of the values we want to write
* @return the corresponding field writer
*/
+ abstract protected FieldWriter getWriter(ArrowType type);
+
abstract protected FieldWriter getWriter(MinorType type);
Review comment:
I agree ideally we should have just one. However currently, this is needed
to support this:
```
TimestampWriter timestampWriter = rootWriter.timestamp("a", TimeUnit.SECOND,
"America/New_York");
timestampWriter.writeTimestamp(1000)
```
The second line here, the type "timestampWriter" is a promotable writer and
it needs to lookup the writer by `MinorType.TIMESTAMP`
We need to do more refactoring to support this API without `abstract
protected FieldWriter getWriter(MinorType type)`, but since this is going to be
internal change and this PR is already quite complicated, I prefer this to be a
follow up.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [Java] Resolve new vector classes structure for timestamp, date and maybe
> interval
> ----------------------------------------------------------------------------------
>
> Key: ARROW-1816
> URL: https://issues.apache.org/jira/browse/ARROW-1816
> Project: Apache Arrow
> Issue Type: Sub-task
> Reporter: Li Jin
> Assignee: Li Jin
> Labels: pull-request-available
> Fix For: 0.8.0
>
>
> Personally I think having 8 vector classes for timestamps is not great. This
> is discussed at some point during the PR:
> https://github.com/apache/arrow/pull/1203#discussion_r145241388
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)