jfsii commented on code in PR #3628:
URL: https://github.com/apache/hive/pull/3628#discussion_r984716423
##########
serde/src/java/org/apache/hadoop/hive/serde2/io/HiveBaseCharWritable.java:
##########
@@ -26,10 +26,19 @@
import org.apache.hive.common.util.HiveStringUtils;
public abstract class HiveBaseCharWritable {
- protected Text value = new Text();
+ protected Text value;
protected int charLength = -1;
public HiveBaseCharWritable() {
+ value = new Text();
+ }
+
+ public HiveBaseCharWritable(Text text) {
+ value = text;
+ }
+
+ public HiveBaseCharWritable(byte[] bytes) {
+ value = new Text(bytes);
Review Comment:
Likely no specific reason, it just happened to end up that way. I suppose
that I didn't notice the set method on the Text object and wanted to avoid an
extra allocation.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]