jduo commented on code in PR #37883:
URL: https://github.com/apache/arrow/pull/37883#discussion_r1337616910
##########
java/vector/src/main/codegen/templates/ComplexWriters.java:
##########
@@ -120,11 +120,18 @@ public void write(Nullable${minor.class}Holder h) {
}
</#if>
- <#if minor.class == "VarChar">
+ <#if minor.class?ends_with("VarChar")>
+ @Override
public void write${minor.class}(${friendlyType} value) {
vector.setSafe(idx(), value);
vector.setValueCount(idx()+1);
}
+
+ @Override
+ public void write${minor.class}(String value) {
+ vector.setSafe(idx(), new Text(value));
Review Comment:
That makes sense. It looks like it'd avoid an allocation if write was called
with strings of decreasing size.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]