public class AbstractVarcharType extends AbstractVariableWidthType
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_LENGTH |
static int |
UNBOUNDED_LENGTH |
| Modifier and Type | Method and Description |
|---|---|
void |
appendTo(Block block,
int position,
BlockBuilder blockBuilder)
Append the value at
position in block to blockBuilder. |
int |
compareTo(Block leftBlock,
int leftPosition,
Block rightBlock,
int rightPosition)
Compare the values in the specified block at the specified positions equal.
|
boolean |
equals(Object o) |
boolean |
equalTo(Block leftBlock,
int leftPosition,
Block rightBlock,
int rightPosition)
Are the values in the specified blocks at the specified positions equal?
|
String |
getDisplayName()
Returns the name of this type that should be displayed to end-users.
|
int |
getLength()
Deprecated.
|
int |
getLengthSafe() |
Object |
getObjectValue(SqlFunctionProperties properties,
Block block,
int position)
Gets an object representation of the type value in the
block
position. |
io.airlift.slice.Slice |
getSlice(Block block,
int position)
Gets the value at the
block position as a Slice. |
io.airlift.slice.Slice |
getSliceUnchecked(Block block,
int internalPosition)
Gets the value at the
block position as a Slice
without boundary checks |
long |
hash(Block block,
int position)
Calculates the hash code of the value at the specified position in the
specified block.
|
int |
hashCode() |
boolean |
isComparable()
True if the type supports equalTo and hash.
|
boolean |
isOrderable()
True if the type supports compareTo.
|
boolean |
isUnbounded() |
String |
toString() |
void |
writeBytes(AbstractVariableWidthBlockBuilder blockBuilder,
byte[] bytes,
int offset,
int length)
writeBytes directly to blockBuilder, without creating a short-lived Slice wrapper.
|
void |
writeSlice(BlockBuilder blockBuilder,
io.airlift.slice.Slice value)
Writes the Slice value into the
BlockBuilder. |
void |
writeSlice(BlockBuilder blockBuilder,
io.airlift.slice.Slice value,
int offset,
int length)
Writes the Slice value into the
BlockBuilder. |
void |
writeString(BlockBuilder blockBuilder,
String value) |
createBlockBuilder, createBlockBuildergetTypeSignaturegetBlockUnchecked, getBoolean, getBooleanUnchecked, getDouble, getDoubleUnchecked, getJavaType, getLong, getLongUnchecked, getObject, getTypeParameters, writeBoolean, writeDouble, writeLong, writeObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBlockUnchecked, getBoolean, getBooleanUnchecked, getDouble, getDoubleUnchecked, getJavaType, getLong, getLongUnchecked, getObject, getTypeParameters, getTypeSignature, writeBoolean, writeDouble, writeLong, writeObjectpublic static final int UNBOUNDED_LENGTH
public static final int MAX_LENGTH
@Deprecated public int getLength()
public int getLengthSafe()
public boolean isUnbounded()
public boolean isComparable()
TypeisComparable in interface TypeisComparable in class AbstractTypepublic boolean isOrderable()
TypeisOrderable in interface TypeisOrderable in class AbstractTypepublic Object getObjectValue(SqlFunctionProperties properties, Block block, int position)
Typeblock
position. This is the value returned to the user via the
REST endpoint and therefore must be JSON serializable.public boolean equalTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
TypeThis method assumes input is not null.
equalTo in interface TypeequalTo in class AbstractTypepublic long hash(Block block, int position)
Typehash in interface Typehash in class AbstractTypepublic int compareTo(Block leftBlock, int leftPosition, Block rightBlock, int rightPosition)
TypecompareTo in interface TypecompareTo in class AbstractTypepublic void appendTo(Block block, int position, BlockBuilder blockBuilder)
Typeposition in block to blockBuilder.public io.airlift.slice.Slice getSlice(Block block, int position)
Typeblock position as a Slice.getSlice in interface TypegetSlice in class AbstractTypepublic io.airlift.slice.Slice getSliceUnchecked(Block block, int internalPosition)
Typeblock position as a Slice
without boundary checksgetSliceUnchecked in interface TypegetSliceUnchecked in class AbstractTypepublic void writeString(BlockBuilder blockBuilder, String value)
public void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value)
TypeBlockBuilder.writeSlice in interface TypewriteSlice in class AbstractTypepublic void writeSlice(BlockBuilder blockBuilder, io.airlift.slice.Slice value, int offset, int length)
TypeBlockBuilder.writeSlice in interface TypewriteSlice in class AbstractTypepublic void writeBytes(AbstractVariableWidthBlockBuilder blockBuilder, byte[] bytes, int offset, int length)
public boolean equals(Object o)
equals in class AbstractTypepublic int hashCode()
hashCode in class AbstractTypepublic String getDisplayName()
TypegetDisplayName in interface TypegetDisplayName in class AbstractTypepublic String toString()
toString in class AbstractTypeCopyright © 2012–2022. All rights reserved.