Package io.prestosql.type
Class JsonType
- java.lang.Object
-
- io.prestosql.spi.type.AbstractType
-
- io.prestosql.spi.type.AbstractVariableWidthType
-
- io.prestosql.type.JsonType
-
- All Implemented Interfaces:
Type
,VariableWidthType
public class JsonType extends AbstractVariableWidthType
The stack representation for JSON objects must have the keys in natural sorted order.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.spi.type.Type
Type.Range
-
-
Field Summary
Fields Modifier and Type Field Description static JsonType
JSON
-
Fields inherited from class io.prestosql.spi.type.AbstractVariableWidthType
EXPECTED_BYTES_PER_ENTRY
-
-
Constructor Summary
Constructors Constructor Description JsonType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendTo(Block block, int position, BlockBuilder blockBuilder)
Object
getObjectValue(ConnectorSession session, Block block, int position)
io.airlift.slice.Slice
getSlice(Block block, int position)
TypeOperatorDeclaration
getTypeOperatorDeclaration(TypeOperators typeOperators)
boolean
isComparable()
void
writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value)
void
writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value, int offset, int length)
void
writeString(BlockBuilder blockBuilder, String value)
-
Methods inherited from class io.prestosql.spi.type.AbstractVariableWidthType
createBlockBuilder, createBlockBuilder
-
Methods inherited from class io.prestosql.spi.type.AbstractType
equals, getBoolean, getDisplayName, getDouble, getJavaType, getLong, getObject, getTypeParameters, getTypeSignature, hashCode, isOrderable, toString, writeBoolean, writeDouble, writeLong, writeObject
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.prestosql.spi.type.Type
getBaseName, getBoolean, getDisplayName, getDouble, getJavaType, getLong, getObject, getRange, getTypeId, getTypeParameters, getTypeSignature, isOrderable, writeBoolean, writeDouble, writeLong, writeObject
-
-
-
-
Field Detail
-
JSON
public static final JsonType JSON
-
-
Method Detail
-
isComparable
public boolean isComparable()
- Specified by:
isComparable
in interfaceType
- Overrides:
isComparable
in classAbstractType
-
getTypeOperatorDeclaration
public TypeOperatorDeclaration getTypeOperatorDeclaration(TypeOperators typeOperators)
-
getObjectValue
public Object getObjectValue(ConnectorSession session, Block block, int position)
-
appendTo
public void appendTo(Block block, int position, BlockBuilder blockBuilder)
-
getSlice
public io.airlift.slice.Slice getSlice(Block block, int position)
- Specified by:
getSlice
in interfaceType
- Overrides:
getSlice
in classAbstractType
-
writeString
public void writeString(BlockBuilder blockBuilder, String value)
-
writeSlice
public void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value)
- Specified by:
writeSlice
in interfaceType
- Overrides:
writeSlice
in classAbstractType
-
writeSlice
public void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value, int offset, int length)
- Specified by:
writeSlice
in interfaceType
- Overrides:
writeSlice
in classAbstractType
-
-