org.apache.hadoop.hive.common.type
Class HiveChar
java.lang.Object
org.apache.hadoop.hive.common.type.HiveBaseChar
org.apache.hadoop.hive.common.type.HiveChar
- All Implemented Interfaces:
- Comparable<HiveChar>
public class HiveChar
- extends HiveBaseChar
- implements Comparable<HiveChar>
HiveChar.
String values will be padded to full char length.
Character legnth, comparison, hashCode should ignore trailing spaces.
MAX_CHAR_LENGTH
public static final int MAX_CHAR_LENGTH
- See Also:
- Constant Field Values
HiveChar
public HiveChar()
HiveChar
public HiveChar(String val,
int len)
HiveChar
public HiveChar(HiveChar hc,
int len)
setValue
public void setValue(String val,
int len)
- Set char value, padding or truncating the value to the size of len parameter.
- Overrides:
setValue in class HiveBaseChar
- Parameters:
val - new value
setValue
public void setValue(String val)
getStrippedValue
public String getStrippedValue()
getPaddedValue
protected String getPaddedValue()
getCharacterLength
public int getCharacterLength()
- Overrides:
getCharacterLength in class HiveBaseChar
toString
public String toString()
- Overrides:
toString in class HiveBaseChar
compareTo
public int compareTo(HiveChar rhs)
- Specified by:
compareTo in interface Comparable<HiveChar>
equals
public boolean equals(Object rhs)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class HiveBaseChar
Copyright © 2014 The Apache Software Foundation. All rights reserved.