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) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(HiveDecimalWritable that) |
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) |
void |
setFromBytes(byte[] bytes,
int offset,
int length) |
String |
toString() |
void |
write(DataOutput out) |
void |
writeToByteStream(ByteStream.RandomAccessOutput byteStream) |
static void |
writeToByteStream(Decimal128 dec,
ByteStream.Output byteStream) |
public HiveDecimalWritable()
public HiveDecimalWritable(byte[] bytes, int scale)
public HiveDecimalWritable(HiveDecimalWritable writable)
public HiveDecimalWritable(HiveDecimal 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 void setFromBytes(byte[] bytes, int offset, int length)
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 static void writeToByteStream(Decimal128 dec, ByteStream.Output byteStream)
public void writeToByteStream(ByteStream.RandomAccessOutput byteStream)
public byte[] getInternalStorage()
public int getScale()
Copyright © 2017 The Apache Software Foundation. All rights reserved.