Package org.apache.calcite.adapter.clone
Class ArrayTable.PrimitiveArray
- java.lang.Object
-
- org.apache.calcite.adapter.clone.ArrayTable.PrimitiveArray
-
- All Implemented Interfaces:
ArrayTable.Representation
- Enclosing class:
- ArrayTable
public static class ArrayTable.PrimitiveArray extends java.lang.Object implements ArrayTable.Representation
Representation that stores the values of a column in an array of primitive values.
-
-
Constructor Summary
Constructors Constructor Description PrimitiveArray(int ordinal, Primitive primitive, Primitive p)
-
Method Summary
All 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)
java.lang.Object
getObject(java.lang.Object dataSet, int ordinal)
ArrayTable.RepresentationType
getType()
Returns the representation type.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.
-
-
-
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
-
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
-
-