Package org.rumbledb.runtime.typing
Class TreatIterator
java.lang.Object
org.rumbledb.runtime.plan.RuntimePlan<Item>
org.rumbledb.runtime.plan.ItemRuntimePlan
org.rumbledb.runtime.typing.TreatIterator
- All Implemented Interfaces:
Serializable,DataFrameRuntimePlan<Item>,LocalRuntimePlan<Item>,NativeQueryRuntimePlan,RDDRuntimePlan<Item>,UpdatingRuntimePlan
public class TreatIterator
extends ItemRuntimePlan
implements LocalRuntimePlan<Item>, RDDRuntimePlan<Item>, DataFrameRuntimePlan<Item>, UpdatingRuntimePlan, NativeQueryRuntimePlan
- See Also:
-
Field Summary
Fields inherited from class org.rumbledb.runtime.plan.RuntimePlan
staticContext -
Constructor Summary
ConstructorsConstructorDescriptionTreatIterator(ItemRuntimePlan iterator, SequenceType sequenceType, ErrorCode errorCode, RuntimeStaticContext staticContext) -
Method Summary
Modifier and TypeMethodDescriptionstatic HomogeneousItemDataFrameconvertToDataFrame(org.apache.spark.api.java.JavaRDD<?> rdd, ItemType itemType, RuntimeStaticContext staticContext) Converts a homogeneous RDD of atomic values to a DataFramecreateNativeCursor(DynamicContext context) Creates an independent cursor for one native local evaluation.createNativeDataFrame(DynamicContext dynamicContext) Builds the DataFrame for one evaluation.org.apache.spark.api.java.JavaRDD<Item>createNativeRDD(DynamicContext dynamicContext) Builds the RDD for one evaluation.generateNativeQuery(NativeClauseContext nativeClauseContext) static ItemTypegetItemType(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> df) getPendingUpdateList(DynamicContext context) Methods 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
-
TreatIterator
public TreatIterator(ItemRuntimePlan iterator, SequenceType sequenceType, ErrorCode errorCode, RuntimeStaticContext staticContext)
-
-
Method Details
-
createNativeCursor
Description copied from interface:LocalRuntimePlanCreates an independent cursor for one native local evaluation.- Specified by:
createNativeCursorin interfaceLocalRuntimePlan<Item>- Parameters:
context- the dynamic context for that evaluation- Returns:
- an unopened cursor
-
createNativeRDD
Description copied from interface:RDDRuntimePlanBuilds the RDD for one evaluation.- Specified by:
createNativeRDDin interfaceRDDRuntimePlan<Item>- Parameters:
dynamicContext- the dynamic context for that evaluation- Returns:
- the resulting RDD
-
getItemType
-
createNativeDataFrame
Description copied from interface:DataFrameRuntimePlanBuilds the DataFrame for one evaluation.- Specified by:
createNativeDataFramein interfaceDataFrameRuntimePlan<Item>- Parameters:
dynamicContext- the dynamic context for that evaluation- Returns:
- the resulting DataFrame
-
getPendingUpdateList
- Specified by:
getPendingUpdateListin interfaceUpdatingRuntimePlan
-
convertToDataFrame
public static HomogeneousItemDataFrame convertToDataFrame(org.apache.spark.api.java.JavaRDD<?> rdd, ItemType itemType, RuntimeStaticContext staticContext) Converts a homogeneous RDD of atomic values to a DataFrame- Parameters:
rdd- the RDD containing the atomic values.itemType- the dynamic type of these values.- Returns:
-
generateNativeQuery
- Specified by:
generateNativeQueryin interfaceNativeQueryRuntimePlan
-