T - Element type of source tableclass ColumnLoader<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
ColumnLoader.Kev
Key-value pair.
|
(package private) static class |
ColumnLoader.ValueSet
Set of values of a column, created during the load process, and converted
to a serializable (and more compact) form before load completes.
|
| Modifier and Type | Field and Description |
|---|---|
private static com.google.common.base.Function<Date,Integer> |
DATE_TO_INT |
(package private) static int[] |
INT_B |
(package private) static int[] |
INT_S |
List<T> |
list |
(package private) static long[] |
LONG_B |
(package private) static int[] |
LONG_S |
List<ArrayTable.Column> |
representationValues |
int |
sortField |
private static com.google.common.base.Function<Time,Integer> |
TIME_TO_INT |
private static com.google.common.base.Function<Timestamp,Long> |
TIMESTAMP_TO_LONG |
private JavaTypeFactory |
typeFactory |
| Constructor and Description |
|---|
ColumnLoader(JavaTypeFactory typeFactory,
Enumerable<T> sourceTable,
RelProtoDataType protoRowType,
List<org.apache.calcite.avatica.ColumnMetaData.Rep> repList)
Creates a column loader, and performs the load.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) static int[] |
invert(int[] targets) |
(package private) static boolean |
isIdentity(int[] sources) |
private void |
load(RelDataType elementType,
List<org.apache.calcite.avatica.ColumnMetaData.Rep> repList,
int[] sort) |
(package private) static int |
log2(int v) |
(package private) static int |
log2(long v) |
(package private) static int |
nextPowerOf2(int v) |
(package private) static long |
nextPowerOf2(long v) |
int |
size() |
private static List |
wrap(org.apache.calcite.avatica.ColumnMetaData.Rep rep,
List list,
RelDataType type)
Adapt for some types that we represent differently internally than their
JDBC types.
|
static final int[] INT_B
static final int[] INT_S
static final long[] LONG_B
static final int[] LONG_S
private static final com.google.common.base.Function<Timestamp,Long> TIMESTAMP_TO_LONG
public final List<ArrayTable.Column> representationValues
private final JavaTypeFactory typeFactory
public final int sortField
ColumnLoader(JavaTypeFactory typeFactory, Enumerable<T> sourceTable, RelProtoDataType protoRowType, List<org.apache.calcite.avatica.ColumnMetaData.Rep> repList)
typeFactory - Type factorysourceTable - Source dataprotoRowType - Logical row typerepList - Physical row types, or null if not knownstatic int nextPowerOf2(int v)
static long nextPowerOf2(long v)
static int log2(int v)
static int log2(long v)
static int[] invert(int[] targets)
static boolean isIdentity(int[] sources)
public int size()
private void load(RelDataType elementType, List<org.apache.calcite.avatica.ColumnMetaData.Rep> repList, int[] sort)
private static List wrap(org.apache.calcite.avatica.ColumnMetaData.Rep rep, List list, RelDataType type)
Timestamp values that are not null are
converted to long, but nullable timestamps are acquired using
ResultSet.getObject(int) and therefore the Timestamp
value needs to be converted to a Long. Similarly
Date and Time values to
Integer.Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.