Package org.apache.spark.sql.scripting
Interface NonLeafStatementExec
- All Superinterfaces:
CompoundStatementExec
,org.apache.spark.internal.Logging
- All Known Implementing Classes:
CaseStatementExec
,CompoundBodyExec
,CompoundNestedStatementIteratorExec
,IfElseStatementExec
,RepeatStatementExec
,WhileStatementExec
Non-leaf node in the execution tree. It is an iterator over executable child nodes.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging
org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter
-
Method Summary
Modifier and TypeMethodDescriptionboolean
evaluateBooleanCondition
(SparkSession session, LeafStatementExec statement) Evaluate the boolean condition represented by the statement.scala.collection.Iterator<CompoundStatementExec>
Construct the iterator to traverse the tree rooted at this node in an in-order traversal.Methods inherited from interface org.apache.spark.sql.scripting.CompoundStatementExec
isInternal, reset
Methods inherited from interface org.apache.spark.internal.Logging
initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContext
-
Method Details
-
evaluateBooleanCondition
Evaluate the boolean condition represented by the statement.- Parameters:
session
- SparkSession that SQL script is executed within.statement
- Statement representing the boolean condition to evaluate.- Returns:
- The value (
true
orfalse
) of condition evaluation; or throw the error during the evaluation (eg: returning multiple rows of data or non-boolean statement).
-
getTreeIterator
scala.collection.Iterator<CompoundStatementExec> getTreeIterator()Construct the iterator to traverse the tree rooted at this node in an in-order traversal.- Returns:
- Tree iterator.
-