public abstract class ByteArrayColumnType<T extends org.apache.spark.sql.types.DataType> extends ColumnType<T,byte[]>
| Constructor and Description |
|---|
ByteArrayColumnType(int typeId,
int defaultSize) |
| Modifier and Type | Method and Description |
|---|---|
int |
actualSize(org.apache.spark.sql.Row row,
int ordinal)
Returns the size of the value
row(ordinal). |
void |
append(byte[] v,
java.nio.ByteBuffer buffer)
Appends the given value v of type T into the given ByteBuffer.
|
byte[] |
extract(java.nio.ByteBuffer buffer)
Extracts a value out of the buffer at the buffer's current position.
|
public int actualSize(org.apache.spark.sql.Row row,
int ordinal)
ColumnTyperow(ordinal). This is used to calculate the size of variable
length types such as byte arrays and strings.actualSize in class ColumnType<T extends org.apache.spark.sql.types.DataType,byte[]>public void append(byte[] v,
java.nio.ByteBuffer buffer)
ColumnTypeappend in class ColumnType<T extends org.apache.spark.sql.types.DataType,byte[]>public byte[] extract(java.nio.ByteBuffer buffer)
ColumnTypeextract in class ColumnType<T extends org.apache.spark.sql.types.DataType,byte[]>