org.apache.spark.sql.catalyst.analysis

HiveTypeCoercion

object HiveTypeCoercion

A collection of Rules that can be used to coerce differing types that participate in operations into compatible ones. Most of these rules are based on Hive semantics, but they do not introduce any dependencies on the hive codebase. For this reason they remain in Catalyst until we have a more standard set of coercions.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HiveTypeCoercion
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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 BooleanEquality extends Rule[LogicalPlan]

    Changes numeric values to booleans so that expressions like true = 1 can be evaluated.

  7. object CaseWhenCoercion extends Rule[LogicalPlan]

    Coerces the type of different branches of a CASE WHEN statement to a common type.

  8. object DateTimeOperations extends Rule[LogicalPlan]

    Turns Add/Subtract of DateType/TimestampType/StringType and CalendarIntervalType to TimeAdd/TimeSub

  9. object DecimalPrecision extends Rule[LogicalPlan]

    Calculates and propagates precision for fixed-precision decimals.

  10. object Division extends Rule[LogicalPlan]

    Hive only performs integral division with the DIV operator.

  11. object FunctionArgumentConversion extends Rule[LogicalPlan]

    This ensure that the types for various functions are as expected.

  12. object IfCoercion extends Rule[LogicalPlan]

    Coerces the type of different branches of If statement to a common type.

  13. object ImplicitTypeCasts extends Rule[LogicalPlan]

    Casts types according to the expected input types for Expressions.

  14. object InConversion extends Rule[LogicalPlan]

    Convert the value and in list expressions to the common operator type by looking at all the argument types and finding the closest one that all the arguments can be cast to.

  15. object PromoteStrings extends Rule[LogicalPlan]

    Promotes strings that appear in arithmetic expressions.

  16. object PropagateTypes extends Rule[LogicalPlan]

    Applies any changes to AttributeReference data types that are made by other rules to instances higher in the query tree.

  17. object StringToIntegralCasts extends Rule[LogicalPlan]

    When encountering a cast from a string representing a valid fractional number to an integral type the jvm will throw a java.lang.NumberFormatException.

  18. object WidenSetOperationTypes extends Rule[LogicalPlan]

    Widens numeric types and converts strings to numbers when appropriate.

  19. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  20. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  23. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. val findTightestCommonTypeOfTwo: (DataType, DataType) ⇒ Option[DataType]

    Find the tightest common type of two types that might be used in a binary expression.

    Find the tightest common type of two types that might be used in a binary expression. This handles all numeric types except fixed-precision decimals interacting with each other or with primitive types, because in that case the precision and scale of the result depends on the operation. Those rules are implemented in HiveTypeCoercion.DecimalPrecision.

  25. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. val typeCoercionRules: List[Rule[LogicalPlan]]

  34. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped