Enum ArrayTable.RepresentationType
- java.lang.Object
-
- java.lang.Enum<ArrayTable.RepresentationType>
-
- org.apache.calcite.adapter.clone.ArrayTable.RepresentationType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ArrayTable.RepresentationType>
- Enclosing class:
- ArrayTable
static enum ArrayTable.RepresentationType extends java.lang.Enum<ArrayTable.RepresentationType>
How a column's values are represented.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BIT_SLICED_PRIMITIVE_ARRAY
Bit-sliced primitive array.BYTE_STRING_DICTIONARY
Compressed byte array table.CONSTANT
Constant.OBJECT_ARRAY
Object array.OBJECT_DICTIONARY
Dictionary of objects.PRIMITIVE_ARRAY
Array of primitives.PRIMITIVE_DICTIONARY
Dictionary of primitives.STRING_DICTIONARY
Compressed string table.
-
Constructor Summary
Constructors Modifier Constructor Description private
RepresentationType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArrayTable.RepresentationType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ArrayTable.RepresentationType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONSTANT
public static final ArrayTable.RepresentationType CONSTANT
Constant. Contains only one value.We can't store 0-bit values in an array: we'd have no way of knowing how many there were.
- See Also:
ArrayTable.Constant
-
OBJECT_ARRAY
public static final ArrayTable.RepresentationType OBJECT_ARRAY
Object array. Null values are represented by null. Values may or may not be canonized; if canonized, = and != can be implemented using pointer.- See Also:
ArrayTable.ObjectArray
-
PRIMITIVE_ARRAY
public static final ArrayTable.RepresentationType PRIMITIVE_ARRAY
Array of primitives. Null values not possible. Only for primitive types (and not optimal for boolean).- See Also:
ArrayTable.PrimitiveArray
-
BIT_SLICED_PRIMITIVE_ARRAY
public static final ArrayTable.RepresentationType BIT_SLICED_PRIMITIVE_ARRAY
Bit-sliced primitive array. Values arebitCount
bits each, and interpreted as signed. Stored as an array of long values.If gcd(bitCount, 64) != 0, some values will cross boundaries. bits each. But for all of those values except 4, there is a primitive type (8 byte, 16 short, 32 int) which is more efficient.
- See Also:
ArrayTable.BitSlicedPrimitiveArray
-
PRIMITIVE_DICTIONARY
public static final ArrayTable.RepresentationType PRIMITIVE_DICTIONARY
Dictionary of primitives. Use one of the previous methods to store unsigned offsets into the dictionary. Dictionary is canonized and sorted, so v1 < v2 if and only if code(v1) < code(v2). The dictionary may or may not contain a null value.The dictionary is not beneficial unless the codes are significantly shorter than the values. A column of
long
values with many duplicates is a win; a column of mostly distinctshort
values is likely a loss. The other win is if there are null values; otherwise the best option would be anOBJECT_ARRAY
.- See Also:
ArrayTable.PrimitiveDictionary
-
OBJECT_DICTIONARY
public static final ArrayTable.RepresentationType OBJECT_DICTIONARY
Dictionary of objects. Use one of the previous methods to store unsigned offsets into the dictionary.- See Also:
ArrayTable.ObjectDictionary
-
STRING_DICTIONARY
public static final ArrayTable.RepresentationType STRING_DICTIONARY
Compressed string table. Block of char data. Strings represented using an unsigned offset into the table (stored using one of the previous methods).First 2 bytes are unsigned length; subsequent bytes are string contents. The null value, strings longer than 64k and strings that occur very commonly are held in an 'exceptions' array and are recognized by their high offsets. Other strings are created on demand (this reduces the number of objects that need to be created during deserialization from cache.
- See Also:
ArrayTable.StringDictionary
-
BYTE_STRING_DICTIONARY
public static final ArrayTable.RepresentationType BYTE_STRING_DICTIONARY
Compressed byte array table. Similar to compressed string table.- See Also:
ArrayTable.ByteStringDictionary
-
-
Method Detail
-
values
public static ArrayTable.RepresentationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ArrayTable.RepresentationType c : ArrayTable.RepresentationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ArrayTable.RepresentationType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-