You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/02/26 08:47:48 UTC
[GitHub] [arrow] liyafan82 commented on a change in pull request #9151: ARROW-11173: [Java] Add map type in complex reader / writer
liyafan82 commented on a change in pull request #9151:
URL: https://github.com/apache/arrow/pull/9151#discussion_r583475049
##########
File path: java/vector/src/main/codegen/templates/AbstractPromotableFieldWriter.java
##########
@@ -144,6 +174,16 @@ public ListWriter list() {
return getWriter(MinorType.LIST).list();
}
+ @Override
+ public MapWriter map() {
+ return getWriter(MinorType.LIST).map();
+ }
+
+ @Override
+ public MapWriter map(boolean keysSorted) {
+ return getWriter(MinorType.MAP, new ArrowType.Map(keysSorted));
Review comment:
Do we need to have two static final instaces of `ArrowType.Map` that corresponds to cases when keysSorted equals to `true` and `false`?
This may avoid some object allocations.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org