public final class NestedRow extends BinarySection implements BaseRow
BinaryRow
.
The only different is that, as NestedRow
is used
to store row value in the variable-length part of BinaryRow
,
every field (including both fixed-length part and variable-length part) of NestedRow
has a possibility to cross the boundary of a segment, while the fixed-length part of BinaryRow
must fit into its first memory segment.offset, segments, sizeInBytes
HIGHEST_FIRST_BIT, HIGHEST_SECOND_TO_EIGHTH_BIT, MAX_FIX_PART_DATA_SIZE
Constructor and Description |
---|
NestedRow(int arity) |
Modifier and Type | Method and Description |
---|---|
NestedRow |
copy() |
NestedRow |
copy(BaseRow reuse) |
int |
getArity()
Get the number of fields in the BaseRow.
|
BaseArray |
getArray(int pos)
Get array value, internal format is BaseArray.
|
byte[] |
getBinary(int pos)
Get binary value, internal format is byte[].
|
boolean |
getBoolean(int pos)
Get boolean value.
|
byte |
getByte(int pos)
Get byte value.
|
Decimal |
getDecimal(int pos,
int precision,
int scale)
Get decimal value, internal format is Decimal.
|
double |
getDouble(int pos)
Get double value.
|
float |
getFloat(int pos)
Get float value.
|
<T> BinaryGeneric<T> |
getGeneric(int pos)
Get generic value, internal format is BinaryGeneric.
|
byte |
getHeader()
The header represents the type of this Row.
|
int |
getInt(int pos)
Get int value.
|
long |
getLong(int pos)
Get long value.
|
BaseMap |
getMap(int pos)
Get map value, internal format is BaseMap.
|
BaseRow |
getRow(int pos,
int numFields)
Get row value, internal format is BaseRow.
|
short |
getShort(int pos)
Get short value.
|
BinaryString |
getString(int pos)
Get string value, internal format is BinaryString.
|
SqlTimestamp |
getTimestamp(int pos,
int precision)
Get Timestamp value, internal format is SqlTimestamp.
|
int |
hashCode() |
boolean |
isNullAt(int pos)
Because the specific row implementation such as BinaryRow uses the binary format.
|
void |
setBoolean(int pos,
boolean value)
Set boolean value.
|
void |
setByte(int pos,
byte value)
Set byte value.
|
void |
setDecimal(int pos,
Decimal value,
int precision)
Set the decimal column value.
|
void |
setDouble(int pos,
double value)
Set double value.
|
void |
setFloat(int pos,
float value)
Set float value.
|
void |
setHeader(byte header)
Set the byte header.
|
void |
setInt(int pos,
int value)
Set int value.
|
void |
setLong(int pos,
long value)
Set long value.
|
void |
setNullAt(int i)
|
void |
setShort(int pos,
short value)
Set short value.
|
void |
setTimestamp(int pos,
SqlTimestamp value,
int precision)
Set Timestamp value.
|
equals, getOffset, getSegments, getSizeInBytes, pointTo, pointTo
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
get
readBinaryFieldFromSegments, readBinaryStringFieldFromSegments
public int getArity()
BaseRow
public byte getHeader()
BaseRow
public void setHeader(byte header)
BaseRow
public void setNullAt(int i)
setNullAt
in interface TypeGetterSetters
public void setInt(int pos, int value)
TypeGetterSetters
setInt
in interface TypeGetterSetters
public void setLong(int pos, long value)
TypeGetterSetters
setLong
in interface TypeGetterSetters
public void setDouble(int pos, double value)
TypeGetterSetters
setDouble
in interface TypeGetterSetters
public void setDecimal(int pos, Decimal value, int precision)
TypeGetterSetters
Note: Precision is compact: can call setNullAt when decimal is null. Precision is not compact: can not call setNullAt when decimal is null, must call setDecimal(i, null, precision) because we need update var-length-part.
setDecimal
in interface TypeGetterSetters
public void setTimestamp(int pos, SqlTimestamp value, int precision)
TypeGetterSetters
Note: If precision is compact: can call setNullAt when SqlTimestamp value is null. Otherwise: can not call setNullAt when SqlTimestamp value is null, must call setTimestamp(ordinal, null, precision) because we need to update var-length-part.
setTimestamp
in interface TypeGetterSetters
public void setBoolean(int pos, boolean value)
TypeGetterSetters
setBoolean
in interface TypeGetterSetters
public void setShort(int pos, short value)
TypeGetterSetters
setShort
in interface TypeGetterSetters
public void setByte(int pos, byte value)
TypeGetterSetters
setByte
in interface TypeGetterSetters
public void setFloat(int pos, float value)
TypeGetterSetters
setFloat
in interface TypeGetterSetters
public boolean isNullAt(int pos)
TypeGetterSetters
isNullAt
in interface TypeGetterSetters
public boolean getBoolean(int pos)
TypeGetterSetters
getBoolean
in interface TypeGetterSetters
public byte getByte(int pos)
TypeGetterSetters
getByte
in interface TypeGetterSetters
public short getShort(int pos)
TypeGetterSetters
getShort
in interface TypeGetterSetters
public int getInt(int pos)
TypeGetterSetters
getInt
in interface TypeGetterSetters
public long getLong(int pos)
TypeGetterSetters
getLong
in interface TypeGetterSetters
public float getFloat(int pos)
TypeGetterSetters
getFloat
in interface TypeGetterSetters
public double getDouble(int pos)
TypeGetterSetters
getDouble
in interface TypeGetterSetters
public BinaryString getString(int pos)
TypeGetterSetters
getString
in interface TypeGetterSetters
public Decimal getDecimal(int pos, int precision, int scale)
TypeGetterSetters
getDecimal
in interface TypeGetterSetters
public SqlTimestamp getTimestamp(int pos, int precision)
TypeGetterSetters
getTimestamp
in interface TypeGetterSetters
public <T> BinaryGeneric<T> getGeneric(int pos)
TypeGetterSetters
getGeneric
in interface TypeGetterSetters
public byte[] getBinary(int pos)
TypeGetterSetters
getBinary
in interface TypeGetterSetters
public BaseRow getRow(int pos, int numFields)
TypeGetterSetters
getRow
in interface TypeGetterSetters
public BaseArray getArray(int pos)
TypeGetterSetters
getArray
in interface TypeGetterSetters
public BaseMap getMap(int pos)
TypeGetterSetters
getMap
in interface TypeGetterSetters
public NestedRow copy()
public int hashCode()
hashCode
in class BinarySection
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.