Package org.apache.druid.segment.virtual
Class ExpressionVectorValueSelector
- java.lang.Object
-
- org.apache.druid.segment.virtual.ExpressionVectorValueSelector
-
- All Implemented Interfaces:
VectorSizeInspector
,VectorValueSelector
public class ExpressionVectorValueSelector extends Object implements VectorValueSelector
-
-
Constructor Summary
Constructors Constructor Description ExpressionVectorValueSelector(ExprVectorProcessor<?> processor, Expr.VectorInputBinding bindings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCurrentVectorSize()
Returns the current vector size for this cursor.double[]
getDoubleVector()
Get the current vector, casting to doubles as necessary.float[]
getFloatVector()
Get the current vector, casting to floats as necessary.long[]
getLongVector()
Get the current vector, casting to longs as necessary.int
getMaxVectorSize()
Returns the maximum vector size for this cursor.boolean[]
getNullVector()
Gets a vector of booleans signifying which rows are null and which are not (true for null).
-
-
-
Constructor Detail
-
ExpressionVectorValueSelector
public ExpressionVectorValueSelector(ExprVectorProcessor<?> processor, Expr.VectorInputBinding bindings)
-
-
Method Detail
-
getLongVector
public long[] getLongVector()
Description copied from interface:VectorValueSelector
Get the current vector, casting to longs as necessary. The array will be reused, so it is not a good idea to retain a reference to it.- Specified by:
getLongVector
in interfaceVectorValueSelector
-
getFloatVector
public float[] getFloatVector()
Description copied from interface:VectorValueSelector
Get the current vector, casting to floats as necessary. The array will be reused, so it is not a good idea to retain a reference to it.- Specified by:
getFloatVector
in interfaceVectorValueSelector
-
getDoubleVector
public double[] getDoubleVector()
Description copied from interface:VectorValueSelector
Get the current vector, casting to doubles as necessary. The array will be reused, so it is not a good idea to retain a reference to it.- Specified by:
getDoubleVector
in interfaceVectorValueSelector
-
getNullVector
@Nullable public boolean[] getNullVector()
Description copied from interface:VectorValueSelector
Gets a vector of booleans signifying which rows are null and which are not (true for null). Returns null if it is known that there are no nulls in the vector, possibly because the column is non-nullable.- Specified by:
getNullVector
in interfaceVectorValueSelector
-
getMaxVectorSize
public int getMaxVectorSize()
Description copied from interface:VectorSizeInspector
Returns the maximum vector size for this cursor. It will not change for the lifetime of this cursor, and is generally used to allocate scratch arrays for later processing. Will always be greater than zero.- Specified by:
getMaxVectorSize
in interfaceVectorSizeInspector
-
getCurrentVectorSize
public int getCurrentVectorSize()
Description copied from interface:VectorSizeInspector
Returns the current vector size for this cursor. Will never be larger than the max size returned byVectorSizeInspector.getMaxVectorSize()
.- Specified by:
getCurrentVectorSize
in interfaceVectorSizeInspector
-
-