public class CarbonVectorProxy extends Object
| Constructor and Description |
|---|
CarbonVectorProxy(org.apache.spark.memory.MemoryMode memMode,
int rowNum,
org.apache.spark.sql.types.StructField[] structFileds)
Adapter class which handles the columnar vector reading of the carbondata
based on the spark ColumnVector and ColumnarBatch API.
|
CarbonVectorProxy(org.apache.spark.memory.MemoryMode memMode,
org.apache.spark.sql.types.StructType outputSchema,
int rowNum) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Called to close all the columns in this batch.
|
org.apache.spark.sql.execution.vectorized.ColumnVector |
column(int ordinal)
This API will return a columnvector from a batch of column vector rows
based on the ordinal
|
org.apache.spark.sql.types.DataType |
dataType(int ordinal) |
Object |
getColumnarBatch()
Returns the row in this batch at `rowId`.
|
org.apache.spark.sql.execution.vectorized.ColumnVector |
getColumnVector(int ordinal) |
org.apache.spark.sql.catalyst.InternalRow |
getRow(int rowId)
Returns the row in this batch at `rowId`.
|
boolean |
hasDictionary(int ordinal) |
boolean |
isNullAt(int rowId,
int ordinal) |
int |
numRows()
Returns the number of rows for read, including filtered rows.
|
void |
putBoolean(int rowId,
boolean value,
int ordinal) |
void |
putByte(int rowId,
byte value,
int ordinal) |
void |
putByteArray(int rowId,
byte[] value,
int ordinal) |
void |
putByteArray(int rowId,
byte[] value,
int offset,
int length,
int ordinal) |
void |
putDecimal(int rowId,
org.apache.spark.sql.types.Decimal value,
int precision,
int ordinal) |
void |
putDictionaryInt(int rowId,
int value,
int ordinal) |
void |
putDouble(int rowId,
double value,
int ordinal) |
void |
putDoubles(int rowId,
int count,
double value,
int ordinal) |
void |
putFloat(int rowId,
float value,
int ordinal) |
void |
putInt(int rowId,
int value,
int ordinal) |
void |
putInts(int rowId,
int count,
int value,
int ordinal) |
void |
putLong(int rowId,
long value,
int ordinal) |
void |
putLongs(int rowId,
int count,
long value,
int ordinal) |
void |
putNotNull(int rowId,
int ordinal) |
void |
putNotNulls(int rowId,
int count,
int ordinal) |
void |
putNull(int rowId,
int ordinal) |
void |
putNulls(int rowId,
int count,
int ordinal) |
void |
putRowToColumnBatch(int rowId,
Object value,
int offset) |
void |
putShort(int rowId,
short value,
int ordinal) |
void |
putShorts(int rowId,
int count,
short value,
int ordinal) |
Object |
reserveDictionaryIds(int capacity,
int ordinal) |
void |
reset()
Resets this column for writing.
|
void |
resetDictionaryIds(int ordinal) |
void |
setDictionary(org.apache.carbondata.core.scan.result.vector.CarbonDictionary dictionary,
int ordinal) |
void |
setNumRows(int numRows)
Sets the number of rows in this batch.
|
public CarbonVectorProxy(org.apache.spark.memory.MemoryMode memMode,
int rowNum,
org.apache.spark.sql.types.StructField[] structFileds)
memMode - which represent the type onheap or offheap vector.rowNum - rows number for vector readingstructFileds, - metadata related to current schema of table.public CarbonVectorProxy(org.apache.spark.memory.MemoryMode memMode,
org.apache.spark.sql.types.StructType outputSchema,
int rowNum)
public org.apache.spark.sql.execution.vectorized.ColumnVector getColumnVector(int ordinal)
public void setNumRows(int numRows)
public Object reserveDictionaryIds(int capacity, int ordinal)
public int numRows()
public void setDictionary(org.apache.carbondata.core.scan.result.vector.CarbonDictionary dictionary,
int ordinal)
public void putNull(int rowId,
int ordinal)
public void putNulls(int rowId,
int count,
int ordinal)
public void close()
public org.apache.spark.sql.catalyst.InternalRow getRow(int rowId)
public Object getColumnarBatch()
public void resetDictionaryIds(int ordinal)
public org.apache.spark.sql.execution.vectorized.ColumnVector column(int ordinal)
ordinal - public boolean hasDictionary(int ordinal)
public void reset()
public void putRowToColumnBatch(int rowId,
Object value,
int offset)
public void putBoolean(int rowId,
boolean value,
int ordinal)
public void putByte(int rowId,
byte value,
int ordinal)
public void putShort(int rowId,
short value,
int ordinal)
public void putInt(int rowId,
int value,
int ordinal)
public void putFloat(int rowId,
float value,
int ordinal)
public void putLong(int rowId,
long value,
int ordinal)
public void putDouble(int rowId,
double value,
int ordinal)
public void putByteArray(int rowId,
byte[] value,
int ordinal)
public void putInts(int rowId,
int count,
int value,
int ordinal)
public void putShorts(int rowId,
int count,
short value,
int ordinal)
public void putLongs(int rowId,
int count,
long value,
int ordinal)
public void putDecimal(int rowId,
org.apache.spark.sql.types.Decimal value,
int precision,
int ordinal)
public void putDoubles(int rowId,
int count,
double value,
int ordinal)
public void putByteArray(int rowId,
byte[] value,
int offset,
int length,
int ordinal)
public boolean isNullAt(int rowId,
int ordinal)
public org.apache.spark.sql.types.DataType dataType(int ordinal)
public void putNotNull(int rowId,
int ordinal)
public void putNotNulls(int rowId,
int count,
int ordinal)
public void putDictionaryInt(int rowId,
int value,
int ordinal)
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.