public class CarbonVectorProxy extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CarbonVectorProxy.ColumnVectorProxy |
static class |
CarbonVectorProxy.ColumnVectorProxyWithLazyLoad |
| Constructor and Description |
|---|
CarbonVectorProxy(org.apache.spark.memory.MemoryMode memMode,
org.apache.spark.sql.types.StructType outputSchema,
int rowNum,
boolean useLazyLoad)
Adapter class which handles the columnar vector reading of the carbondata
based on the spark ColumnVector and ColumnarBatch API.
|
| 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`.
|
CarbonVectorProxy.ColumnVectorProxy |
getColumnVector(int ordinal) |
org.apache.spark.sql.catalyst.InternalRow |
getRow(int rowId)
Returns the row in this batch at `rowId`.
|
int |
numRows()
Returns the number of rows for read, including filtered rows.
|
void |
reset()
Resets this column for writing.
|
void |
resetDictionaryIds(int ordinal) |
void |
setNumRows(int numRows)
Sets the number of rows in this batch.
|
public CarbonVectorProxy(org.apache.spark.memory.MemoryMode memMode,
org.apache.spark.sql.types.StructType outputSchema,
int rowNum,
boolean useLazyLoad)
memMode - which represent the type onheap or offheap vector.outputSchema, - metadata related to current schema of table.rowNum - rows number for vector readinguseLazyLoad - Whether to use lazy load while getting the data.public CarbonVectorProxy.ColumnVectorProxy getColumnVector(int ordinal)
public int numRows()
public org.apache.spark.sql.execution.vectorized.ColumnVector column(int ordinal)
ordinal - public void reset()
public void resetDictionaryIds(int ordinal)
public org.apache.spark.sql.catalyst.InternalRow getRow(int rowId)
public Object getColumnarBatch()
public void close()
public void setNumRows(int numRows)
public org.apache.spark.sql.types.DataType dataType(int ordinal)
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.