Class TermSelector
- java.lang.Object
-
- org.apache.cassandra.cql3.selection.Selector
-
- org.apache.cassandra.cql3.selection.TermSelector
-
public class TermSelector extends Selector
Selector representing a simple term (literals or bound variables).Note that we know the term does not include function calls for instance (this is actually enforced by the parser), those being dealt with by their own Selector.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.cql3.selection.Selector
Selector.Factory, Selector.InputRow, Selector.Kind, Selector.SelectorDeserializer, Selector.Serializer
-
-
Field Summary
Fields Modifier and Type Field Description protected static Selector.SelectorDeserializerdeserializer-
Fields inherited from class org.apache.cassandra.cql3.selection.Selector
serializer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFetchedColumns(ColumnFilter.Builder builder)Add to the provided builder the column (and potential subselections) to fetch for this selection.voidaddInput(ProtocolVersion protocolVersion, Selector.InputRow input)Add the current value from the specifiedResultSetBuilder.booleanequals(java.lang.Object o)java.nio.ByteBuffergetOutput(ProtocolVersion protocolVersion)Returns the selector output.AbstractType<?>getType()Returns theSelectoroutput type.inthashCode()booleanisTerminal()A selector is terminal if it doesn't require any input for it's output to be computed, i.e.static Selector.FactorynewFactory(java.lang.String name, Term term, AbstractType<?> type)voidreset()Reset the internal state of thisSelector.protected voidserialize(DataOutputPlus out, int version)protected intserializedSize(int version)-
Methods inherited from class org.apache.cassandra.cql3.selection.Selector
kind, sizeOf, validateForGroupBy, writeType
-
-
-
-
Field Detail
-
deserializer
protected static final Selector.SelectorDeserializer deserializer
-
-
Method Detail
-
newFactory
public static Selector.Factory newFactory(java.lang.String name, Term term, AbstractType<?> type)
-
addFetchedColumns
public void addFetchedColumns(ColumnFilter.Builder builder)
Description copied from class:SelectorAdd to the provided builder the column (and potential subselections) to fetch for this selection.- Specified by:
addFetchedColumnsin classSelector- Parameters:
builder- the builder to add columns and subselections to.
-
addInput
public void addInput(ProtocolVersion protocolVersion, Selector.InputRow input)
Description copied from class:SelectorAdd the current value from the specifiedResultSetBuilder.
-
getOutput
public java.nio.ByteBuffer getOutput(ProtocolVersion protocolVersion)
Description copied from class:SelectorReturns the selector output.
-
getType
public AbstractType<?> getType()
Description copied from class:SelectorReturns theSelectoroutput type.
-
reset
public void reset()
Description copied from class:SelectorReset the internal state of thisSelector.
-
isTerminal
public boolean isTerminal()
Description copied from class:SelectorA selector is terminal if it doesn't require any input for it's output to be computed, i.e. ifSelector.getOutput(org.apache.cassandra.transport.ProtocolVersion)result doesn't depend ofSelector.addInput(org.apache.cassandra.transport.ProtocolVersion, org.apache.cassandra.cql3.selection.Selector.InputRow). This is typically the case of a constant value or functions on constant values.- Overrides:
isTerminalin classSelector
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
serializedSize
protected int serializedSize(int version)
- Specified by:
serializedSizein classSelector
-
serialize
protected void serialize(DataOutputPlus out, int version) throws java.io.IOException
-
-