Package org.rumbledb.runtime.typing
Class TreatIterator
java.lang.Object
org.rumbledb.runtime.RuntimeIterator
org.rumbledb.runtime.HybridRuntimeIterator
org.rumbledb.runtime.typing.TreatIterator
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Serializable
,RuntimeIteratorInterface
- See Also:
-
Field Summary
Fields inherited from class org.rumbledb.runtime.HybridRuntimeIterator
result
Fields inherited from class org.rumbledb.runtime.RuntimeIterator
children, currentDynamicContextForLocalExecution, FLOW_EXCEPTION_MESSAGE, hasNext, isOpen, isSequential, isUpdating, staticContext, staticURI
-
Constructor Summary
ConstructorsConstructorDescriptionTreatIterator
(RuntimeIterator iterator, SequenceType sequenceType, boolean isUpdating, ErrorCode errorCode, RuntimeStaticContext staticContext) TreatIterator
(RuntimeIterator iterator, SequenceType sequenceType, ErrorCode errorCode, RuntimeStaticContext staticContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static JSoundDataFrame
convertToDataFrame
(org.apache.spark.api.java.JavaRDD<?> rdd, ItemType itemType) Converts a homogeneous RDD of atomic values to a DataFramegenerateNativeQuery
(NativeClauseContext nativeClauseContext) This function generate (if possible) a native spark-sql query that maps the inner working of the iteratorgetDataFrame
(DynamicContext dynamicContext) static ItemType
getItemType
(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> df) getPendingUpdateList
(DynamicContext context) org.apache.spark.api.java.JavaRDD<Item>
getRDDAux
(DynamicContext dynamicContext) boolean
protected boolean
void
void
Methods inherited from class org.rumbledb.runtime.HybridRuntimeIterator
close, dataFrameToRDDOfItems, fallbackToRDDIfDFNotImplemented, getRDD, hasNext, implementsLocal, implementsRDD, materialize, materializeAtMostOneItemOrNull, materializeExactlyOneItem, materializeFirstItemOrNull, materializeNFirstItems, next, open, reset
Methods inherited from class org.rumbledb.runtime.RuntimeIterator
bindToVariableInDynamicContext, canProduceDataFrame, deepCopy, getConfiguration, getEffectiveBooleanValue, getEffectiveBooleanValueOrCheckPosition, getHighestExecutionMode, getMetadata, getOrCreateDataFrame, getStaticType, getVariableDependencies, isDataFrame, isLocal, isOpen, isRDD, isRDDOrDataFrame, isSequential, isSparkJobNeeded, isUpdating, materialize, materializeAtMostOneItemOrDefault, print, printToStandardError, read, setStaticContext, write
-
Constructor Details
-
TreatIterator
public TreatIterator(RuntimeIterator iterator, SequenceType sequenceType, boolean isUpdating, ErrorCode errorCode, RuntimeStaticContext staticContext) -
TreatIterator
public TreatIterator(RuntimeIterator iterator, SequenceType sequenceType, ErrorCode errorCode, RuntimeStaticContext staticContext)
-
-
Method Details
-
hasNextLocal
public boolean hasNextLocal()- Specified by:
hasNextLocal
in classHybridRuntimeIterator
-
resetLocal
public void resetLocal()- Specified by:
resetLocal
in classHybridRuntimeIterator
-
closeLocal
public void closeLocal()- Specified by:
closeLocal
in classHybridRuntimeIterator
-
openLocal
public void openLocal()- Specified by:
openLocal
in classHybridRuntimeIterator
-
nextLocal
- Specified by:
nextLocal
in classHybridRuntimeIterator
-
getRDDAux
- Specified by:
getRDDAux
in classHybridRuntimeIterator
-
implementsDataFrames
protected boolean implementsDataFrames()- Overrides:
implementsDataFrames
in classHybridRuntimeIterator
-
getItemType
-
getDataFrame
- Overrides:
getDataFrame
in classRuntimeIterator
-
getPendingUpdateList
- Overrides:
getPendingUpdateList
in classRuntimeIterator
-
convertToDataFrame
public static JSoundDataFrame convertToDataFrame(org.apache.spark.api.java.JavaRDD<?> rdd, ItemType itemType) 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
Description copied from class:RuntimeIterator
This function generate (if possible) a native spark-sql query that maps the inner working of the iterator- Overrides:
generateNativeQuery
in classRuntimeIterator
- Parameters:
nativeClauseContext
- context information to generate the native query- Returns:
- a native clause context with the spark-sql native query to get an equivalent result of the iterator, or [NativeClauseContext.NoNativeQuery] if it is not possible
-