Package org.rumbledb.runtime
Class HybridRuntimeIterator
java.lang.Object
org.rumbledb.runtime.RuntimeIterator
org.rumbledb.runtime.HybridRuntimeIterator
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,Serializable,RuntimeIteratorInterface
- Direct Known Subclasses:
AppendExpressionIterator,ArrayDescendantFunctionIterator,ArrayFlattenFunctionIterator,ArrayLookupIterator,ArrayMembersFunctionIterator,ArrayUnboxingIterator,AtomizationIterator,CommaExpressionIterator,ConstantRDDRuntimeIterator,CreateCollectionIterator,DeleteExpressionIterator,DeleteIndexFromCollectionIterator,DeleteSearchFromCollectionIterator,DistinctValuesFunctionIterator,DropColumnsIterator,DynamicFunctionCallIterator,EditCollectionIterator,ExitStatementIterator,FunctionItemCallIterator,IfRuntimeIterator,IndexOfFunctionIterator,InsertBeforeFunctionIterator,InsertExpressionIterator,InsertIndexIntoCollectionIterator,InsertSearchIntoCollectionIterator,JsonLinesFunctionIterator,ObjectDescendantFunctionIterator,ObjectKeysFunctionIterator,ObjectLookupIterator,ObjectProjectFunctionIterator,ObjectRemoveKeysFunctionIterator,ObjectValuesFunctionIterator,OneOrMoreIterator,ParallelizeFunctionIterator,PostfixLookupIterator,PredicateIterator,ProgramIterator,RangeOperationIterator,RDDRuntimeIterator,RemoveFunctionIterator,RenameExpressionIterator,RepartitionFunctionIterator,ReplaceExpressionIterator,ReturnClauseSparkIterator,ReverseFunctionIterator,SimpleMapExpressionIterator,SlashExprIterator,StatementsWithExprIterator,StaticUserDefinedFunctionCallIterator,SubsequenceFunctionIterator,SwitchRuntimeIterator,TailFunctionIterator,TransformExpressionIterator,TreatIterator,TruncateCollectionIterator,TypePromotionIterator,TypeswitchRuntimeIterator,UnorderedFunctionIterator,ValidateTypeIterator,VariableReferenceIterator
- See Also:
-
Field Summary
FieldsFields inherited from class org.rumbledb.runtime.RuntimeIterator
children, currentDynamicContextForLocalExecution, FLOW_EXCEPTION_MESSAGE, hasNext, isOpen, isSequential, isUpdating, staticContext, staticURI -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHybridRuntimeIterator(List<RuntimeIterator> children, RuntimeStaticContext staticContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected abstract voidcollectRDDwithLimit(org.apache.spark.api.java.JavaRDD<Item> rdd, RumbleRuntimeConfiguration configuration, ExceptionMetadata metadata) static org.apache.spark.api.java.JavaRDD<Item>dataFrameToRDDOfItems(JSoundDataFrame df, ExceptionMetadata metadata) protected voidfallbackToRDDIfDFNotImplemented(ExecutionMode executionMode) org.apache.spark.api.java.JavaRDD<Item>getRDD(DynamicContext context) protected abstract org.apache.spark.api.java.JavaRDD<Item>getRDDAux(DynamicContext context) booleanhasNext()protected abstract booleanprotected booleanprotected booleanprotected booleanvoidmaterialize(DynamicContext context, List<Item> result) Materialize the items of the iterator into the result list.materializeExactlyOneItem(DynamicContext context) materializeFirstItemOrNull(DynamicContext context) voidmaterializeNFirstItems(DynamicContext context, List<Item> result, int n) next()protected abstract Itemvoidopen(DynamicContext context) protected abstract voidvoidreset(DynamicContext context) protected abstract voidMethods inherited from class org.rumbledb.runtime.RuntimeIterator
bindToVariableInDynamicContext, canProduceDataFrame, deepCopy, generateNativeQuery, getConfiguration, getDataFrame, getEffectiveBooleanValue, getEffectiveBooleanValueOrCheckPosition, getHighestExecutionMode, getMetadata, getOrCreateDataFrame, getPendingUpdateList, getStaticType, getVariableDependencies, isDataFrame, isLocal, isOpen, isRDD, isRDDOrDataFrame, isSequential, isSparkJobNeeded, isUpdating, materialize, materializeAtMostOneItemOrDefault, print, printToStandardError, read, setStaticContext, write
-
Field Details
-
result
-
-
Constructor Details
-
HybridRuntimeIterator
-
-
Method Details
-
implementsDataFrames
protected boolean implementsDataFrames() -
implementsLocal
protected boolean implementsLocal() -
implementsRDD
protected boolean implementsRDD() -
fallbackToRDDIfDFNotImplemented
-
open
- Specified by:
openin interfaceRuntimeIteratorInterface- Overrides:
openin classRuntimeIterator
-
reset
- Specified by:
resetin interfaceRuntimeIteratorInterface- Overrides:
resetin classRuntimeIterator
-
close
public void close()- Specified by:
closein interfaceRuntimeIteratorInterface- Overrides:
closein classRuntimeIterator
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceRuntimeIteratorInterface- Overrides:
hasNextin classRuntimeIterator
-
next
- Specified by:
nextin interfaceRuntimeIteratorInterface- Specified by:
nextin classRuntimeIterator
-
getRDD
- Overrides:
getRDDin classRuntimeIterator
-
dataFrameToRDDOfItems
public static org.apache.spark.api.java.JavaRDD<Item> dataFrameToRDDOfItems(JSoundDataFrame df, ExceptionMetadata metadata) -
collectRDDwithLimit
public static List<Item> collectRDDwithLimit(org.apache.spark.api.java.JavaRDD<Item> rdd, RumbleRuntimeConfiguration configuration, ExceptionMetadata metadata) -
materialize
Description copied from class:RuntimeIteratorMaterialize the items of the iterator into the result list.- Overrides:
materializein classRuntimeIterator- Parameters:
context- the dynamic contextresult- the list to materialize the items into. The list is cleared before the materialization.
-
materializeNFirstItems
- Overrides:
materializeNFirstItemsin classRuntimeIterator
-
materializeFirstItemOrNull
- Overrides:
materializeFirstItemOrNullin classRuntimeIterator
-
materializeExactlyOneItem
public Item materializeExactlyOneItem(DynamicContext context) throws NoItemException, MoreThanOneItemException - Overrides:
materializeExactlyOneItemin classRuntimeIterator- Throws:
NoItemExceptionMoreThanOneItemException
-
materializeAtMostOneItemOrNull
- Overrides:
materializeAtMostOneItemOrNullin classRuntimeIterator- Throws:
MoreThanOneItemException
-
getRDDAux
-
openLocal
protected abstract void openLocal() -
closeLocal
protected abstract void closeLocal() -
resetLocal
protected abstract void resetLocal() -
hasNextLocal
protected abstract boolean hasNextLocal() -
nextLocal
-