public class HiveDecimalWritable extends Object implements org.apache.hadoop.io.WritableComparable<HiveDecimalWritable>
Constructor and Description |
---|
HiveDecimalWritable() |
HiveDecimalWritable(byte[] bytes,
int scale) |
HiveDecimalWritable(HiveDecimal value) |
HiveDecimalWritable(HiveDecimalWritable writable) |
HiveDecimalWritable(long value) |
HiveDecimalWritable(String value) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(HiveDecimalWritable that) |
static HiveDecimalWritable |
enforcePrecisionScale(HiveDecimalWritable writable,
int precision,
int scale) |
boolean |
equals(Object other) |
HiveDecimal |
getHiveDecimal() |
HiveDecimal |
getHiveDecimal(int maxPrecision,
int maxScale)
Get a HiveDecimal instance from the writable and constraint it with maximum precision/scale.
|
byte[] |
getInternalStorage() |
int |
getScale() |
int |
hashCode() |
void |
readFields(DataInput in) |
void |
set(byte[] bytes,
int scale) |
void |
set(HiveDecimal value) |
void |
set(HiveDecimal value,
int maxPrecision,
int maxScale) |
void |
set(HiveDecimalWritable writable) |
String |
toString() |
void |
write(DataOutput out) |
public HiveDecimalWritable()
public HiveDecimalWritable(String value)
public HiveDecimalWritable(byte[] bytes, int scale)
public HiveDecimalWritable(HiveDecimalWritable writable)
public HiveDecimalWritable(HiveDecimal value)
public HiveDecimalWritable(long value)
public void set(HiveDecimal value)
public void set(HiveDecimal value, int maxPrecision, int maxScale)
public void set(HiveDecimalWritable writable)
public void set(byte[] bytes, int scale)
public HiveDecimal getHiveDecimal()
public HiveDecimal getHiveDecimal(int maxPrecision, int maxScale)
maxPrecision
- maximum precisionmaxScale
- maximum scalepublic void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public int compareTo(HiveDecimalWritable that)
compareTo
in interface Comparable<HiveDecimalWritable>
public byte[] getInternalStorage()
public int getScale()
public static HiveDecimalWritable enforcePrecisionScale(HiveDecimalWritable writable, int precision, int scale)
Copyright © 2016 The Apache Software Foundation. All rights reserved.