Packages

c

org.apache.spark.sql.catalyst.analysis.resolver

SetOperationLikeResolver

class SetOperationLikeResolver extends TreeNodeResolver[LogicalPlan, LogicalPlan]

The SetOperationLikeResolver performs Union, Intersect or Except operator resolution. These operators have 2+ children. Resolution involves checking and normalizing child output attributes (data types and nullability).

Linear Supertypes
TreeNodeResolver[LogicalPlan, LogicalPlan], QueryErrorsBase, DataTypeErrorsBase, SQLConfHelper, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SetOperationLikeResolver
  2. TreeNodeResolver
  3. QueryErrorsBase
  4. DataTypeErrorsBase
  5. SQLConfHelper
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SetOperationLikeResolver(resolver: Resolver, expressionResolver: ExpressionResolver)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. def conf: SQLConf

    The active config object within the current scope.

    The active config object within the current scope. See SQLConf.get for more information.

    Definition Classes
    SQLConfHelper
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. def getQueryContext(context: QueryContext): Array[QueryContext]
    Definition Classes
    DataTypeErrorsBase
  11. def getSummary(sqlContext: QueryContext): String
    Definition Classes
    DataTypeErrorsBase
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. def ordinalNumber(i: Int): String
    Definition Classes
    QueryErrorsBase
  18. def quoteByDefault(elem: String): String
    Attributes
    protected[sql]
    Definition Classes
    DataTypeErrorsBase
  19. def resolve(unresolvedOperator: LogicalPlan): LogicalPlan

    Resolve the Union, Intersect or Except operators:

    Resolve the Union, Intersect or Except operators:

    • Resolve each child in the context of a) New NameScope b) New ExpressionIdAssigner mapping c) CTE scope. Collect child outputs to coerce them later.
    • Create a new mapping in ExpressionIdAssigner for the current operator. We only need the left child mapping, because that's the only child whose expression IDs get propagated upwards for Union, Intersect or Except. This is an optimization.
    • Compute widened data types for child output attributes using getTypeCoercion.findWiderTypeForTwo or throw "INCOMPATIBLE_COLUMN_TYPE" if coercion fails.
    • Perform individual output deduplication to handle the distinct union case described in performIndividualOutputExpressionIdDeduplication scaladoc.
    • Validate that child outputs have same length or throw "NUM_COLUMNS_MISMATCH" otherwise.
    • Add Project with Cast on children needing attribute data type widening.
    • Assert that coerced outputs don't have conflicting expression IDs.
    • Merge transformed outputs using a separate logic for each operator type.
    • Store merged output in current NameScope.
    • Validate that the operator doesn't have unsupported data types in the output
    • Create a new mapping in ExpressionIdAssigner using the coerced and validated outputs.
    • Return the resolved operator with new children optionally wrapped in WithCTE. See CteScope scaladoc for more info.
    Definition Classes
    SetOperationLikeResolver → TreeNodeResolver
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toDSOption(option: String): String
    Definition Classes
    DataTypeErrorsBase
  22. def toSQLConf(conf: String): String
    Definition Classes
    DataTypeErrorsBase
  23. def toSQLConfVal(conf: String): String
    Definition Classes
    QueryErrorsBase
  24. def toSQLExpr(e: Expression): String
    Definition Classes
    QueryErrorsBase
  25. def toSQLId(parts: Seq[String]): String
    Definition Classes
    DataTypeErrorsBase
  26. def toSQLId(parts: String): String
    Definition Classes
    DataTypeErrorsBase
  27. def toSQLStmt(text: String): String
    Definition Classes
    DataTypeErrorsBase
  28. def toSQLType(t: AbstractDataType): String
    Definition Classes
    DataTypeErrorsBase
  29. def toSQLType(text: String): String
    Definition Classes
    DataTypeErrorsBase
  30. def toSQLValue(v: Any, t: DataType): String
    Definition Classes
    QueryErrorsBase
  31. def toSQLValue(value: Double): String
    Definition Classes
    DataTypeErrorsBase
  32. def toSQLValue(value: Float): String
    Definition Classes
    DataTypeErrorsBase
  33. def toSQLValue(value: Long): String
    Definition Classes
    DataTypeErrorsBase
  34. def toSQLValue(value: Int): String
    Definition Classes
    DataTypeErrorsBase
  35. def toSQLValue(value: Short): String
    Definition Classes
    DataTypeErrorsBase
  36. def toSQLValue(value: UTF8String): String
    Definition Classes
    DataTypeErrorsBase
  37. def toSQLValue(value: String): String
    Definition Classes
    DataTypeErrorsBase
  38. def toString(): String
    Definition Classes
    AnyRef → Any
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  41. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. def withSQLConf[T](pairs: (String, String)*)(f: => T): T

    Sets all SQL configurations specified in pairs, calls f, and then restores all SQL configurations.

    Sets all SQL configurations specified in pairs, calls f, and then restores all SQL configurations.

    Attributes
    protected
    Definition Classes
    SQLConfHelper

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from QueryErrorsBase

Inherited from DataTypeErrorsBase

Inherited from SQLConfHelper

Inherited from AnyRef

Inherited from Any

Ungrouped