Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.1.1, 3.0.0
-
None
-
None
Description
Often times, organizations use tools that create table schemas on the fly and they specify a VARCHAR column with precision. In these scenarios, performance suffers even though one could assume performance should be better since there is pre-existing knowledge about the size of the data and buffers could be more efficiently setup then in the case where no such knowledge exists.
Most of the performance seems to be caused by reading a STRING from a file into a byte buffer, checking the length of the STRING, truncating the STRING if needed, and then serializing the STRING back into bytes again.
From the code, I have identified several areas where develops left notes about later improvements.
- org.apache.hadoop.hive.serde2.io.HiveVarcharWritable.enforceMaxLength(int)
- org.apache.hadoop.hive.serde2.lazy.LazyHiveVarchar.init(ByteArrayRef, int, int)
- org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.getHiveVarchar(Object, PrimitiveObjectInspector)
Attachments
Issue Links
- depends upon
-
HADOOP-14525 org.apache.hadoop.io.Text Truncate
- Open
- relates to
-
HIVE-19229 Automatically Convert VARCHAR to STRING
- Open