Class IterateStatementExec

Object
org.apache.spark.sql.scripting.IterateStatementExec
All Implemented Interfaces:
org.apache.spark.internal.Logging, CompoundStatementExec, LeafStatementExec

public class IterateStatementExec extends Object implements LeafStatementExec
Executable node for ITERATE statement. param: label Label of the loop to iterate.
  • 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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Label specified in the ITERATE statement might not belong to the immediate compound, but to the any surrounding compound.
    boolean
    Whether the statement originates from the SQL script or is created during the interpretation.
     
    void
    Reset execution of the current node.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    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
  • Constructor Details

    • IterateStatementExec

      public IterateStatementExec(String label)
  • Method Details

    • hasBeenMatched

      public boolean hasBeenMatched()
      Label specified in the ITERATE statement might not belong to the immediate compound, but to the any surrounding compound. Iteration logic is recursive, i.e. when iterating through the compound, if another compound is encountered, next() will be called to iterate its body. The same logic is applied to any other compound down the tree. In such cases, when ITERATE statement is encountered (as the leaf of the traversal tree), it will be propagated upwards and the logic will try to match it to the labels of surrounding compounds. Once the match is found, this flag is set to true to indicate that search should be stopped.
      Returns:
      (undocumented)
    • isInternal

      public boolean isInternal()
      Description copied from interface: CompoundStatementExec
      Whether the statement originates from the SQL script or is created during the interpretation. Example: DropVariable statements are automatically created at the end of each compound.
      Specified by:
      isInternal in interface CompoundStatementExec
      Returns:
      (undocumented)
    • label

      public String label()
    • reset

      public void reset()
      Description copied from interface: CompoundStatementExec
      Reset execution of the current node.
      Specified by:
      reset in interface CompoundStatementExec