Package org.apache.calcite.adapter.clone
Class ArrayTable.BitSlicedPrimitiveArray
- java.lang.Object
-
- org.apache.calcite.adapter.clone.ArrayTable.BitSlicedPrimitiveArray
-
- All Implemented Interfaces:
ArrayTable.Representation
- Enclosing class:
- ArrayTable
public static class ArrayTable.BitSlicedPrimitiveArray extends java.lang.Object implements ArrayTable.Representation
Representation that stores numeric values in a bit-sliced array. Each value does not necessarily occupy 8, 16, 32 or 64 bits (the number of bits used by the built-in types). This representation is often used to store the value codes for a dictionary-based representation.
-
-
Constructor Summary
Constructors Constructor Description BitSlicedPrimitiveArray(int ordinal, int bitCount, Primitive primitive, boolean signed)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
freeze(ColumnLoader.ValueSet valueSet, int[] sources)
Converts a value set into a compact representation.int
getInt(java.lang.Object dataSet, int ordinal)
static long
getLong(int bitCount, int chunksPerWord, long mask, long[] values, int ordinal)
static long
getLong(int bitCount, long[] values, int ordinal)
java.lang.Object
getObject(java.lang.Object dataSet, int ordinal)
ArrayTable.RepresentationType
getType()
Returns the representation type.static void
orLong(int bitCount, int chunksPerWord, long[] values, int ordinal, long value)
static void
orLong(int bitCount, long[] values, int ordinal, long value)
java.lang.Object
permute(java.lang.Object dataSet, int[] sources)
Creates a data set that is the same as a given data set but re-ordered.int
size(java.lang.Object dataSet)
Returns the number of elements in a data set.java.lang.String
toString()
java.lang.String
toString(java.lang.Object dataSet)
Converts a data set to a string.
-
-
-
Field Detail
-
ordinal
final int ordinal
-
bitCount
final int bitCount
-
primitive
final Primitive primitive
-
signed
final boolean signed
-
-
Constructor Detail
-
BitSlicedPrimitiveArray
BitSlicedPrimitiveArray(int ordinal, int bitCount, Primitive primitive, boolean signed)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getType
public ArrayTable.RepresentationType getType()
Description copied from interface:ArrayTable.Representation
Returns the representation type.- Specified by:
getType
in interfaceArrayTable.Representation
-
freeze
public java.lang.Object freeze(ColumnLoader.ValueSet valueSet, int[] sources)
Description copied from interface:ArrayTable.Representation
Converts a value set into a compact representation. Ifsources
is not null, permutes.- Specified by:
freeze
in interfaceArrayTable.Representation
-
permute
public java.lang.Object permute(java.lang.Object dataSet, int[] sources)
Description copied from interface:ArrayTable.Representation
Creates a data set that is the same as a given data set but re-ordered.- Specified by:
permute
in interfaceArrayTable.Representation
-
getObject
public java.lang.Object getObject(java.lang.Object dataSet, int ordinal)
- Specified by:
getObject
in interfaceArrayTable.Representation
-
getInt
public int getInt(java.lang.Object dataSet, int ordinal)
- Specified by:
getInt
in interfaceArrayTable.Representation
-
getLong
public static long getLong(int bitCount, long[] values, int ordinal)
-
getLong
public static long getLong(int bitCount, int chunksPerWord, long mask, long[] values, int ordinal)
-
orLong
public static void orLong(int bitCount, long[] values, int ordinal, long value)
-
orLong
public static void orLong(int bitCount, int chunksPerWord, long[] values, int ordinal, long value)
-
size
public int size(java.lang.Object dataSet)
Description copied from interface:ArrayTable.Representation
Returns the number of elements in a data set. (Some representations return the capacity, which may be slightly larger than the actual size.)- Specified by:
size
in interfaceArrayTable.Representation
-
toString
public java.lang.String toString(java.lang.Object dataSet)
Description copied from interface:ArrayTable.Representation
Converts a data set to a string.- Specified by:
toString
in interfaceArrayTable.Representation
-
-