Package org.apache.calcite.adapter.clone
Class ColumnLoader.ValueSet
- java.lang.Object
-
- org.apache.calcite.adapter.clone.ColumnLoader.ValueSet
-
- Enclosing class:
- ColumnLoader<T>
static class ColumnLoader.ValueSet extends java.lang.Object
Set of values of a column, created during the load process, and converted to a serializable (and more compact) form before load completes.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Class
clazz
(package private) boolean
containsNull
(package private) java.util.Map<java.lang.Comparable,java.lang.Comparable>
map
(package private) java.lang.Comparable
max
(package private) java.lang.Comparable
min
(package private) java.util.List<java.lang.Comparable>
values
-
Constructor Summary
Constructors Constructor Description ValueSet(java.lang.Class clazz)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static int
abs2(int v)
Two's complement absolute on int value.private static long
abs2(long v)
Two's complement absolute on long value.(package private) void
add(java.lang.Comparable e)
private boolean
canBeLong(java.lang.Object o)
private ArrayTable.Representation
chooseFixedRep(int ordinal, Primitive p, long min, long max)
Chooses a representation for a fixed-precision primitive type (boolean, byte, char, short, int, long).(package private) ArrayTable.Representation
chooseRep(int ordinal)
(package private) ArrayTable.Column
freeze(int ordinal, int[] sources)
Freezes the contents of this value set into a column, optionally re-ordering ifsources
is specified.private long
toLong(java.lang.Object o)
-
-
-
Method Detail
-
add
void add(java.lang.Comparable e)
-
freeze
ArrayTable.Column freeze(int ordinal, int[] sources)
Freezes the contents of this value set into a column, optionally re-ordering ifsources
is specified.
-
chooseRep
ArrayTable.Representation chooseRep(int ordinal)
-
toLong
private long toLong(java.lang.Object o)
-
canBeLong
private boolean canBeLong(java.lang.Object o)
-
chooseFixedRep
private ArrayTable.Representation chooseFixedRep(int ordinal, Primitive p, long min, long max)
Chooses a representation for a fixed-precision primitive type (boolean, byte, char, short, int, long).- Parameters:
ordinal
- Ordinal of this column in tablep
- Type that values are to be returned as (not necessarily the same as they will be stored)min
- Minimum value to be encodedmax
- Maximum value to be encoded (inclusive)
-
abs2
private static int abs2(int v)
Two's complement absolute on int value.
-
abs2
private static long abs2(long v)
Two's complement absolute on long value.
-
-