org.apache.spark.sql.catalyst.analysis

Analyzer

class Analyzer extends RuleExecutor[LogicalPlan] with CheckAnalysis

Provides a logical query plan analyzer, which translates UnresolvedAttributes and UnresolvedRelations into fully typed objects using information in a SessionCatalog and a FunctionRegistry.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Analyzer
  2. CheckAnalysis
  3. PredicateHelper
  4. RuleExecutor
  5. Logging
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Analyzer(catalog: SessionCatalog, conf: CatalystConf)

  2. new Analyzer(catalog: SessionCatalog, conf: CatalystConf, maxIterations: Int)

Type Members

  1. case class Batch(name: String, strategy: Strategy, rules: Rule[TreeType]*) extends Product with Serializable

    A batch of rules.

  2. case class FixedPoint(maxIterations: Int) extends Strategy with Product with Serializable

    A strategy that runs until fix point or maxIterations times, whichever comes first.

  3. abstract class Strategy extends AnyRef

    An execution strategy for rules that indicates the maximum number of executions.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object CTESubstitution extends Rule[LogicalPlan]

    Substitute child plan with cte definitions

  7. object ExtractGenerator extends Rule[LogicalPlan]

    Extracts Generator from the projectList of a Project operator and create Generate operator under Project.

  8. object ExtractWindowExpressions extends Rule[LogicalPlan]

    Extracts WindowExpressions from the projectList of a Project operator and aggregateExpressions of an Aggregate operator and creates individual Window operators for every distinct WindowSpecDefinition.

  9. object FixNullability extends Rule[LogicalPlan]

    Fixes nullability of Attributes in a resolved LogicalPlan by using the nullability of corresponding Attributes of its children output Attributes.

  10. object GlobalAggregates extends Rule[LogicalPlan]

    Turns projections that contain aggregate expressions into aggregations.

  11. object HandleNullInputsForUDF extends Rule[LogicalPlan]

    Correctly handle null primitive inputs for UDF by adding extra If expression to do the null check.

  12. object Once extends Strategy with Product with Serializable

    A strategy that only runs once.

  13. object PullOutNondeterministic extends Rule[LogicalPlan]

    Pulls out nondeterministic expressions from LogicalPlan which is not Project or Filter, put them into an inner Project and finally project them away at the outer Project.

  14. object ResolveAggregateFunctions extends Rule[LogicalPlan]

    This rule finds aggregate expressions that are not in an aggregate operator.

  15. object ResolveAliases extends Rule[LogicalPlan]

    Replaces UnresolvedAliass with concrete aliases.

  16. object ResolveDeserializer extends Rule[LogicalPlan]

    Replaces UnresolvedDeserializer with the deserialization expression that has been resolved to the given input attributes.

  17. object ResolveFunctions extends Rule[LogicalPlan]

    Replaces UnresolvedFunctions with concrete Expressions.

  18. object ResolveGenerate extends Rule[LogicalPlan]

    Rewrites table generating expressions that either need one or more of the following in order to be resolved:

  19. object ResolveGroupingAnalytics extends Rule[LogicalPlan]

  20. object ResolveMissingReferences extends Rule[LogicalPlan]

    In many dialects of SQL it is valid to sort by attributes that are not present in the SELECT clause.

  21. object ResolveNaturalAndUsingJoin extends Rule[LogicalPlan]

    Removes natural or using joins by calculating output columns based on output from two sides, Then apply a Project on a normal Join to eliminate natural or using join.

  22. object ResolveNewInstance extends Rule[LogicalPlan]

    Resolves NewInstance by finding and adding the outer scope to it if the object being constructed is an inner class.

  23. object ResolveOrdinalInOrderByAndGroupBy extends Rule[LogicalPlan]

    In many dialects of SQL it is valid to use ordinal positions in order/sort by and group by clauses.

  24. object ResolvePivot extends Rule[LogicalPlan]

  25. object ResolveReferences extends Rule[LogicalPlan]

    Replaces UnresolvedAttributes with concrete AttributeReferences from a logical plan node's children.

  26. object ResolveRelations extends Rule[LogicalPlan]

    Replaces UnresolvedRelations with concrete relations from the catalog.

  27. object ResolveSubquery extends Rule[LogicalPlan] with PredicateHelper

    This rule resolves and rewrites subqueries inside expressions.

  28. object ResolveUpCast extends Rule[LogicalPlan]

    Replace the UpCast expression by Cast, and throw exceptions if the cast may truncate.

  29. object ResolveWindowFrame extends Rule[LogicalPlan]

    Check and add proper window frames for all window functions.

  30. object ResolveWindowOrder extends Rule[LogicalPlan]

    Check and add order to AggregateWindowFunctions.

  31. object WindowsSubstitution extends Rule[LogicalPlan]

    Substitute child plan with WindowSpecDefinitions.

  32. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  33. lazy val batches: Seq[Batch]

    Definition Classes
    AnalyzerRuleExecutor
  34. def canEvaluate(expr: Expression, plan: LogicalPlan): Boolean

    Returns true if expr can be evaluated using only the output of plan.

    Returns true if expr can be evaluated using only the output of plan. This method can be used to determine when it is acceptable to move expression evaluation within a query plan.

    For example consider a join between two relations R(a, b) and S(c, d).

    canEvaluate(EqualTo(a,b), R) returns true where as canEvaluate(EqualTo(a,c), R) returns false.

    Attributes
    protected
    Definition Classes
    PredicateHelper
  35. def checkAnalysis(plan: LogicalPlan): Unit

    Definition Classes
    CheckAnalysis
  36. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def containsMultipleGenerators(exprs: Seq[Expression]): Boolean

    Attributes
    protected
    Definition Classes
    CheckAnalysis
  38. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  40. def execute(plan: LogicalPlan): LogicalPlan

    Executes the batches of rules defined by the subclass.

    Executes the batches of rules defined by the subclass. The batches are executed serially using the defined execution strategy. Within each batch, rules are also executed serially.

    Definition Classes
    RuleExecutor
  41. val extendedCheckRules: Seq[(LogicalPlan) ⇒ Unit]

    Override to provide additional checks for correct analysis.

    Override to provide additional checks for correct analysis. These rules will be evaluated after our built-in check rules.

    Definition Classes
    CheckAnalysis
  42. val extendedResolutionRules: Seq[Rule[LogicalPlan]]

    Override to provide additional rules for the "Resolution" batch.

  43. def failAnalysis(msg: String): Nothing

    Attributes
    protected
    Definition Classes
    CheckAnalysis
  44. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  45. val fixedPoint: FixedPoint

    Attributes
    protected
  46. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  47. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  48. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Attributes
    protected
    Definition Classes
    Logging
  49. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  50. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  51. def log: Logger

    Attributes
    protected
    Definition Classes
    Logging
  52. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  53. def logDebug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  54. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  55. def logError(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  56. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  57. def logInfo(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  58. def logName: String

    Attributes
    protected
    Definition Classes
    Logging
  59. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  60. def logTrace(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  61. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  62. def logWarning(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  63. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  64. final def notify(): Unit

    Definition Classes
    AnyRef
  65. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  66. def replaceAlias(condition: Expression, aliases: AttributeMap[Expression]): Expression

    Attributes
    protected
    Definition Classes
    PredicateHelper
  67. def resolveExpression(expr: Expression, plan: LogicalPlan, throws: Boolean = false): Expression

    Attributes
    protected[org.apache.spark.sql]
  68. def resolver: (String, String) ⇒ Boolean

  69. def splitConjunctivePredicates(condition: Expression): Seq[Expression]

    Attributes
    protected
    Definition Classes
    PredicateHelper
  70. def splitDisjunctivePredicates(condition: Expression): Seq[Expression]

    Attributes
    protected
    Definition Classes
    PredicateHelper
  71. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  72. def toString(): String

    Definition Classes
    AnyRef → Any
  73. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  74. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  75. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from CheckAnalysis

Inherited from PredicateHelper

Inherited from RuleExecutor[LogicalPlan]

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped