trait PrepareDeltaScanBase extends Rule[LogicalPlan] with PredicateHelper with DeltaLogging with OptimizeMetadataOnlyDeltaQuery with PreprocessTableWithDVs

Before query planning, we prepare any scans over delta tables by pushing any projections or filters in allowing us to gather more accurate statistics for CBO and metering.

Note the following - This rule also ensures that all reads from the same delta log use the same snapshot of log thus providing snapshot isolation. - If this rule is invoked within an active OptimisticTransaction, then the scans are generated using the transaction.

Self Type
PrepareDeltaScan
Linear Supertypes
PreprocessTableWithDVs, SubqueryTransformerHelper, OptimizeMetadataOnlyDeltaQuery, DeltaLogging, DatabricksLogging, DeltaProgressReporter, PredicateHelper, AliasHelper, Rule[LogicalPlan], Logging, SQLConfHelper, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PrepareDeltaScanBase
  2. PreprocessTableWithDVs
  3. SubqueryTransformerHelper
  4. OptimizeMetadataOnlyDeltaQuery
  5. DeltaLogging
  6. DatabricksLogging
  7. DeltaProgressReporter
  8. PredicateHelper
  9. AliasHelper
  10. Rule
  11. Logging
  12. SQLConfHelper
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. object CountStarDeltaTable

    e.g.

    e.g. sql("SELECT COUNT(*) FROM <deta-table>").collect()

    Definition Classes
    OptimizeMetadataOnlyDeltaQuery
  2. object ShowCountStarDeltaTable

    e.g.

    e.g. sql("SELECT COUNT(*) FROM <delta-table>").show()

    Definition Classes
    OptimizeMetadataOnlyDeltaQuery
  3. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def ##: Int
    Definition Classes
    AnyRef → Any
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def apply(_plan: LogicalPlan): LogicalPlan
    Definition Classes
    PrepareDeltaScanBase → Rule
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def buildBalancedPredicate(expressions: Seq[Expression], op: (Expression, Expression) => Expression): Expression
    Attributes
    protected
    Definition Classes
    PredicateHelper
  9. def canEvaluate(expr: Expression, plan: LogicalPlan): Boolean
    Attributes
    protected
    Definition Classes
    PredicateHelper
  10. def canEvaluateWithinJoin(expr: Expression): Boolean
    Attributes
    protected
    Definition Classes
    PredicateHelper
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. def conf: SQLConf
    Definition Classes
    SQLConfHelper
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def extractPredicatesWithinOutputSet(condition: Expression, outputSet: AttributeSet): Option[Expression]
    Attributes
    protected
    Definition Classes
    PredicateHelper
  16. def filesForScan(scanGenerator: DeltaScanGenerator, limitOpt: Option[Int], filters: Seq[Expression], delta: LogicalRelation): DeltaScan

    Scan files using the given filters and return DeltaScan.

    Scan files using the given filters and return DeltaScan.

    Note: when limitOpt is non empty, filters must contain only partition filters. Otherwise, it can contain arbitrary filters. See DeltaTableScan for more details.

    Attributes
    protected
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. def findExpressionAndTrackLineageDown(exp: Expression, plan: LogicalPlan): Option[(Expression, LogicalPlan)]
    Definition Classes
    PredicateHelper
  19. def getAliasMap(exprs: Seq[NamedExpression]): AttributeMap[Alias]
    Attributes
    protected
    Definition Classes
    AliasHelper
  20. def getAliasMap(plan: Aggregate): AttributeMap[Alias]
    Attributes
    protected
    Definition Classes
    AliasHelper
  21. def getAliasMap(plan: Project): AttributeMap[Alias]
    Attributes
    protected
    Definition Classes
    AliasHelper
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def getCommonTags(deltaLog: DeltaLog, tahoeId: String): Map[TagDefinition, String]
    Definition Classes
    DeltaLogging
  24. def getDeltaScanGenerator(index: TahoeLogFileIndex): DeltaScanGenerator

    Gets the DeltaScanGenerator for the given log, which will be used to generate DeltaScans.

    Gets the DeltaScanGenerator for the given log, which will be used to generate DeltaScans. Every time this method is called on a log within the lifetime of this rule (i.e., the lifetime of the query for which this rule was instantiated), the returned generator will read a snapshot that is pinned on the first access for that log.

    Internally, it will use the snapshot of the file index, the snapshot of the active transaction (if any), or the latest snapshot of the given log.

    Attributes
    protected
    Definition Classes
    PrepareDeltaScanBase → OptimizeMetadataOnlyDeltaQuery
  25. def getPreparedIndex(preparedScan: DeltaScan, fileIndex: TahoeLogFileIndex): PreparedDeltaFileIndex

    Helper method to generate a PreparedDeltaFileIndex

    Helper method to generate a PreparedDeltaFileIndex

    Attributes
    protected
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  28. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. def isLikelySelective(e: Expression): Boolean
    Definition Classes
    PredicateHelper
  31. def isNullIntolerant(expr: Expression): Boolean
    Attributes
    protected
    Definition Classes
    PredicateHelper
  32. def isSubqueryRoot(plan: LogicalPlan): Boolean

    Is the give plan a subquery root.

    Is the give plan a subquery root.

    Definition Classes
    SubqueryTransformerHelper
  33. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  34. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  35. def logConsole(line: String): Unit
    Definition Classes
    DatabricksLogging
  36. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  40. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  41. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  42. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  43. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  44. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  45. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  46. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  47. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  48. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  49. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  50. def optimizeGeneratedColumns(scan: LogicalPlan, preparedIndex: PreparedDeltaFileIndex, filters: Seq[Expression], limit: Option[Int], delta: LogicalRelation): LogicalPlan
    Attributes
    protected
  51. def optimizeQueryWithMetadata(plan: LogicalPlan): LogicalPlan
  52. def outputWithNullability(output: Seq[Attribute], nonNullAttrExprIds: Seq[ExprId]): Seq[Attribute]
    Attributes
    protected
    Definition Classes
    PredicateHelper
  53. def prepareDeltaScan(plan: LogicalPlan): LogicalPlan

    Prepares delta scans sequentially.

    Prepares delta scans sequentially.

    Attributes
    protected
  54. def preprocessTablesWithDVs(plan: LogicalPlan): LogicalPlan
    Definition Classes
    PreprocessTableWithDVs
  55. def recordDeltaEvent(deltaLog: DeltaLog, opType: String, tags: Map[TagDefinition, String] = Map.empty, data: AnyRef = null, path: Option[Path] = None): Unit

    Used to record the occurrence of a single event or report detailed, operation specific statistics.

    Used to record the occurrence of a single event or report detailed, operation specific statistics.

    path

    Used to log the path of the delta table when deltaLog is null.

    Attributes
    protected
    Definition Classes
    DeltaLogging
  56. def recordDeltaOperation[A](deltaLog: DeltaLog, opType: String, tags: Map[TagDefinition, String] = Map.empty)(thunk: => A): A

    Used to report the duration as well as the success or failure of an operation on a deltaLog.

    Used to report the duration as well as the success or failure of an operation on a deltaLog.

    Attributes
    protected
    Definition Classes
    DeltaLogging
  57. def recordDeltaOperationForTablePath[A](tablePath: String, opType: String, tags: Map[TagDefinition, String] = Map.empty)(thunk: => A): A

    Used to report the duration as well as the success or failure of an operation on a tahoePath.

    Used to report the duration as well as the success or failure of an operation on a tahoePath.

    Attributes
    protected
    Definition Classes
    DeltaLogging
  58. def recordEvent(metric: MetricDefinition, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
    Definition Classes
    DatabricksLogging
  59. def recordFrameProfile[T](group: String, name: String)(thunk: => T): T
    Attributes
    protected
    Definition Classes
    DeltaLogging
  60. def recordOperation[S](opType: OpType, opTarget: String = null, extraTags: Map[TagDefinition, String], isSynchronous: Boolean = true, alwaysRecordStats: Boolean = false, allowAuthTags: Boolean = false, killJvmIfStuck: Boolean = false, outputMetric: MetricDefinition = METRIC_OPERATION_DURATION, silent: Boolean = true)(thunk: => S): S
    Definition Classes
    DatabricksLogging
  61. def recordProductEvent(metric: MetricDefinition with CentralizableMetric, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
    Definition Classes
    DatabricksLogging
  62. def recordProductUsage(metric: MetricDefinition with CentralizableMetric, quantity: Double, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, forceSample: Boolean = false, trimBlob: Boolean = true, silent: Boolean = false): Unit
    Definition Classes
    DatabricksLogging
  63. def recordUsage(metric: MetricDefinition, quantity: Double, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, forceSample: Boolean = false, trimBlob: Boolean = true, silent: Boolean = false): Unit
    Definition Classes
    DatabricksLogging
  64. def replaceAlias(expr: Expression, aliasMap: AttributeMap[Alias]): Expression
    Attributes
    protected
    Definition Classes
    AliasHelper
  65. def replaceAliasButKeepName(expr: NamedExpression, aliasMap: AttributeMap[Alias]): NamedExpression
    Attributes
    protected
    Definition Classes
    AliasHelper
  66. lazy val ruleId: RuleId
    Attributes
    protected
    Definition Classes
    Rule
  67. val ruleName: String
    Definition Classes
    Rule
  68. def splitConjunctivePredicates(condition: Expression): Seq[Expression]
    Attributes
    protected
    Definition Classes
    PredicateHelper
  69. def splitDisjunctivePredicates(condition: Expression): Seq[Expression]
    Attributes
    protected
    Definition Classes
    PredicateHelper
  70. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  71. def toString(): String
    Definition Classes
    AnyRef → Any
  72. def transformWithSubqueries(plan: LogicalPlan)(rule: PartialFunction[LogicalPlan, LogicalPlan]): LogicalPlan

    Transform all nodes matched by the rule in the query plan rooted at given plan.

    Transform all nodes matched by the rule in the query plan rooted at given plan. It traverses the tree starting from the leaves, whenever a SubqueryExpression expression is encountered, given rule is applied to the subquery plan plan in SubqueryExpression starting from the plan root until leaves.

    This is slightly different behavior compared to QueryPlan.transformUpWithSubqueries or QueryPlan.transformDownWithSubqueries

    It requires that the given plan already gone through OptimizeSubqueries and the root node denoting a subquery is removed and optimized appropriately.

    Definition Classes
    SubqueryTransformerHelper
  73. def trimAliases(e: Expression): Expression
    Attributes
    protected
    Definition Classes
    AliasHelper
  74. def trimNonTopLevelAliases[T <: Expression](e: T): T
    Attributes
    protected
    Definition Classes
    AliasHelper
  75. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  76. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  77. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  78. def withStatusCode[T](statusCode: String, defaultMessage: String, data: Map[String, Any] = Map.empty)(body: => T): T

    Report a log to indicate some command is running.

    Report a log to indicate some command is running.

    Definition Classes
    DeltaProgressReporter
  79. object DeltaTableScan

    This is an extractor object.

    This is an extractor object. See https://docs.scala-lang.org/tour/extractor-objects.html.

Inherited from PreprocessTableWithDVs

Inherited from DeltaLogging

Inherited from DatabricksLogging

Inherited from DeltaProgressReporter

Inherited from PredicateHelper

Inherited from AliasHelper

Inherited from Rule[LogicalPlan]

Inherited from Logging

Inherited from SQLConfHelper

Inherited from AnyRef

Inherited from Any

Ungrouped