Package org.rumbledb.runtime.misc
Class IntegerRangeComparisonIterator
java.lang.Object
org.rumbledb.runtime.plan.RuntimePlan<Item>
org.rumbledb.runtime.plan.ItemRuntimePlan
org.rumbledb.runtime.AbstractAtMostOneItemRuntimePlan
org.rumbledb.runtime.misc.IntegerRangeComparisonIterator
- All Implemented Interfaces:
Serializable,AtMostOneLocalRuntimePlan<Item>,LocalRuntimePlan<Item>
General comparison of an integer singleton with a direct integer range.
General comparisons are existential: x < (a to b) asks whether any range value exceeds x.
For a nonempty range this is simply x < b, so no range items or Spark join are needed.
The compiler selects this plan only for integer singletons; other numeric types retain
the ordinary comparison path and its numeric-promotion rules.
- See Also:
-
Field Summary
Fields inherited from class org.rumbledb.runtime.plan.RuntimePlan
staticContext -
Constructor Summary
ConstructorsConstructorDescriptionIntegerRangeComparisonIterator(RangeOperationIterator range, ItemRuntimePlan scalar, boolean rangeOnLeft, ComparisonExpression.ComparisonOperator operator, RuntimeStaticContext context) -
Method Summary
Modifier and TypeMethodDescriptionevaluateAtMostOne(DynamicContext context) Evaluates the plan without allocating a cursor.Methods inherited from class org.rumbledb.runtime.AbstractAtMostOneItemRuntimePlan
createNativeCursorMethods inherited from class org.rumbledb.runtime.plan.ItemRuntimePlan
getChild, getChildren, getStaticType, getVariableDependencies, isSparkJobNeeded, printMethods inherited from class org.rumbledb.runtime.plan.RuntimePlan
getConfiguration, getCursor, getDataFrame, getMetadata, getRDD, getRuntimeStaticContext, materialize, materializeAtMost, materializeAtMostOne, materializeExactlyOne, materializeFirstOrNull
-
Constructor Details
-
IntegerRangeComparisonIterator
public IntegerRangeComparisonIterator(RangeOperationIterator range, ItemRuntimePlan scalar, boolean rangeOnLeft, ComparisonExpression.ComparisonOperator operator, RuntimeStaticContext context)
-
-
Method Details
-
evaluateAtMostOne
Description copied from interface:AtMostOneLocalRuntimePlanEvaluates the plan without allocating a cursor.- Specified by:
evaluateAtMostOnein interfaceAtMostOneLocalRuntimePlan<Item>- Specified by:
evaluateAtMostOnein classAbstractAtMostOneItemRuntimePlan- Parameters:
context- the dynamic context for the evaluation- Returns:
- the value, or
nullfor the empty sequence
-