Class QueryOrigin

Object
org.apache.spark.sql.pipelines.graph.QueryOrigin
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class QueryOrigin extends Object implements scala.Product, Serializable
Records information used to track the provenance of a given query to user code.

param: language The language used by the user to define the query. param: filePath Path to the file of the user code that defines the query. param: sqlText The SQL text of the query. param: line The line number of the query in the user code. Line numbers are 1-indexed. param: startPosition The start position of the query in the user code. param: objectType The type of the object that the query is associated with. (Table, View, etc) param: objectName The name of the object that the query is associated with.

See Also:
  • Constructor Details

    • QueryOrigin

      public QueryOrigin(scala.Option<Language> language, scala.Option<String> filePath, scala.Option<String> sqlText, scala.Option<Object> line, scala.Option<Object> startPosition, scala.Option<String> objectType, scala.Option<String> objectName)
  • Method Details

    • empty

      public static QueryOrigin empty()
      An empty QueryOrigin without any provenance information.
    • getOrigin

      public static scala.Option<QueryOrigin> getOrigin(Throwable t)
      Returns the QueryOrigin stored as a suppressed exception in the given throwable.

      Parameters:
      t - (undocumented)
      Returns:
      Some(origin) if the origin is recorded as part of the given throwable, None otherwise.
    • org$apache$spark$internal$Logging$$log_

      public static org.slf4j.Logger org$apache$spark$internal$Logging$$log_()
    • org$apache$spark$internal$Logging$$log__$eq

      public static void org$apache$spark$internal$Logging$$log__$eq(org.slf4j.Logger x$1)
    • LogStringContext

      public static org.apache.spark.internal.Logging.LogStringContext LogStringContext(scala.StringContext sc)
    • language

      public scala.Option<Language> language()
    • filePath

      public scala.Option<String> filePath()
    • sqlText

      public scala.Option<String> sqlText()
    • line

      public scala.Option<Object> line()
    • startPosition

      public scala.Option<Object> startPosition()
    • objectType

      public scala.Option<String> objectType()
    • objectName

      public scala.Option<String> objectName()
    • merge

      public QueryOrigin merge(QueryOrigin other)
      Merges this origin with another one.

      The result has fields set to the value in the other origin if it is defined, or if not, then the value in this origin.

      Parameters:
      other - (undocumented)
      Returns:
      (undocumented)
    • merge

      public QueryOrigin merge(org.apache.spark.sql.catalyst.trees.Origin other)
      Merge values from the catalyst origin.

      The result has fields set to the value in the other origin if it is defined, or if not, then the value in this origin.

      Parameters:
      other - (undocumented)
      Returns:
      (undocumented)