Class LeaveStatementExec

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

public class LeaveStatementExec extends Object implements LeafStatementExec
Executable node for LeaveStatement. param: label Label of the compound or loop to leave.
  • 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 LEAVE statement might not belong to the immediate surrounding 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

    • LeaveStatementExec

      public LeaveStatementExec(String label)
  • Method Details

    • hasBeenMatched

      public boolean hasBeenMatched()
      Label specified in the LEAVE statement might not belong to the immediate surrounding 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 traversal tree. In such cases, when LEAVE 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