Object

org.apache.spark.sql.catalyst.analysis

SimpleAnalyzer

Related Doc: package analysis

Permalink

object SimpleAnalyzer extends Analyzer

A trivial Analyzer with an EmptyCatalog and EmptyFunctionRegistry. Used for testing when all relations are already filled in and the analyzer needs only to resolve attribute references.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SimpleAnalyzer
  2. Analyzer
  3. CheckAnalysis
  4. RuleExecutor
  5. Logging
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

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

    Permalink

    A batch of rules.

    A batch of rules.

    Attributes
    protected
    Definition Classes
    RuleExecutor
  2. case class FixedPoint(maxIterations: Int) extends Strategy with Product with Serializable

    Permalink

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

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

    Definition Classes
    RuleExecutor
  3. abstract class Strategy extends AnyRef

    Permalink

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

    An execution strategy for rules that indicates the maximum number of executions. If the execution reaches fix point (i.e. converge) before maxIterations, it will stop.

    Definition Classes
    RuleExecutor

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. object CTESubstitution extends Rule[LogicalPlan]

    Permalink

    Substitute child plan with cte definitions

    Substitute child plan with cte definitions

    Definition Classes
    Analyzer
  5. object ExtractWindowExpressions extends Rule[LogicalPlan]

    Permalink

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

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

    This rule handles three cases:

    • A Project having WindowExpressions in its projectList;
    • An Aggregate having WindowExpressions in its aggregateExpressions.
    • An Filter->Aggregate pattern representing GROUP BY with a HAVING clause and the Aggregate has WindowExpressions in its aggregateExpressions. Note: If there is a GROUP BY clause in the query, aggregations and corresponding filters (expressions in the HAVING clause) should be evaluated before any WindowExpression. If a query has SELECT DISTINCT, the DISTINCT part should be evaluated after all WindowExpressions.

    For every case, the transformation works as follows: 1. For a list of Expressions (a projectList or an aggregateExpressions), partitions it two lists of Expressions, one for all WindowExpressions and another for all regular expressions. 2. For all WindowExpressions, groups them based on their WindowSpecDefinitions. 3. For every distinct WindowSpecDefinition, creates a Window operator and inserts it into the plan tree.

    Definition Classes
    Analyzer
  6. object GlobalAggregates extends Rule[LogicalPlan]

    Permalink

    Turns projections that contain aggregate expressions into aggregations.

    Turns projections that contain aggregate expressions into aggregations.

    Definition Classes
    Analyzer
  7. object HandleNullInputsForUDF extends Rule[LogicalPlan]

    Permalink

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

    Correctly handle null primitive inputs for UDF by adding extra If expression to do the null check. When user defines a UDF with primitive parameters, there is no way to tell if the primitive parameter is null or not, so here we assume the primitive input is null-propagatable and we should return null if the input is null.

    Definition Classes
    Analyzer
  8. object Once extends Strategy with Product with Serializable

    Permalink

    A strategy that only runs once.

    A strategy that only runs once.

    Definition Classes
    RuleExecutor
  9. object PullOutNondeterministic extends Rule[LogicalPlan]

    Permalink

    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.

    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.

    Definition Classes
    Analyzer
  10. object ResolveAggregateFunctions extends Rule[LogicalPlan]

    Permalink

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

    This rule finds aggregate expressions that are not in an aggregate operator. For example, those in a HAVING clause or ORDER BY clause. These expressions are pushed down to the underlying aggregate operator and then projected away after the original operator.

    Definition Classes
    Analyzer
  11. object ResolveAliases extends Rule[LogicalPlan]

    Permalink

    Replaces UnresolvedAliass with concrete aliases.

    Replaces UnresolvedAliass with concrete aliases.

    Definition Classes
    Analyzer
  12. object ResolveFunctions extends Rule[LogicalPlan]

    Permalink

    Replaces UnresolvedFunctions with concrete Expressions.

    Replaces UnresolvedFunctions with concrete Expressions.

    Definition Classes
    Analyzer
  13. object ResolveGenerate extends Rule[LogicalPlan]

    Permalink

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

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

    • concrete attribute references for their output.
    • to be relocated from a SELECT clause (i.e. from a Project) into a Generate).

    Names for the output Attributes are extracted from Alias or MultiAlias expressions that wrap the Generator. If more than one Generator is found in a Project, an AnalysisException is throw.

    Definition Classes
    Analyzer
  14. object ResolveGroupingAnalytics extends Rule[LogicalPlan]

    Permalink
    Definition Classes
    Analyzer
  15. object ResolvePivot extends Rule[LogicalPlan]

    Permalink
    Definition Classes
    Analyzer
  16. object ResolveReferences extends Rule[LogicalPlan]

    Permalink

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

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

    Definition Classes
    Analyzer
  17. object ResolveRelations extends Rule[LogicalPlan]

    Permalink

    Replaces UnresolvedRelations with concrete relations from the catalog.

    Replaces UnresolvedRelations with concrete relations from the catalog.

    Definition Classes
    Analyzer
  18. object ResolveSortReferences extends Rule[LogicalPlan]

    Permalink

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

    In many dialects of SQL it is valid to sort by attributes that are not present in the SELECT clause. This rule detects such queries and adds the required attributes to the original projection, so that they will be available during sorting. Another projection is added to remove these attributes after sorting.

    Definition Classes
    Analyzer
  19. object WindowsSubstitution extends Rule[LogicalPlan]

    Permalink

    Substitute child plan with WindowSpecDefinitions.

    Substitute child plan with WindowSpecDefinitions.

    Definition Classes
    Analyzer
  20. final def asInstanceOf[T0]: T0

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

    Permalink

    Defines a sequence of rule batches, to be overridden by the implementation.

    Defines a sequence of rule batches, to be overridden by the implementation.

    Definition Classes
    AnalyzerRuleExecutor
  22. def checkAnalysis(plan: LogicalPlan): Unit

    Permalink
    Definition Classes
    CheckAnalysis
  23. def clone(): AnyRef

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

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

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

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

    Permalink

    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
  28. val extendedCheckRules: Seq[(LogicalPlan) ⇒ Unit]

    Permalink

    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
  29. val extendedResolutionRules: Seq[Rule[LogicalPlan]]

    Permalink

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

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

    Definition Classes
    Analyzer
  30. def failAnalysis(msg: String): Nothing

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

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

    Permalink
    Definition Classes
    Analyzer
  33. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  35. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  36. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  37. def log: Logger

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  44. def logName: String

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  50. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  51. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  52. def resolver: Resolver

    Permalink
    Definition Classes
    Analyzer
  53. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  54. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Analyzer

Inherited from CheckAnalysis

Inherited from RuleExecutor[LogicalPlan]

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped