Packages

class TimezoneAwareExpressionResolver extends TreeNodeResolver[TimeZoneAwareExpression, Expression] with ResolvesExpressionChildren with CoercesExpressionTypes

Resolves TimeZoneAwareExpressions by applying the session's local timezone.

This class is responsible for resolving TimeZoneAwareExpressions by first resolving their children and then applying the session's local timezone. Additionally, ensures that any tags from the original expression are preserved during the resolution process.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TimezoneAwareExpressionResolver
  2. CoercesExpressionTypes
  3. ResolvesExpressionChildren
  4. TreeNodeResolver
  5. QueryErrorsBase
  6. DataTypeErrorsBase
  7. SQLConfHelper
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TimezoneAwareExpressionResolver(expressionResolver: ExpressionResolver)

    Creates a new TimezoneAwareExpressionResolver with the given expression resolver.

    Creates a new TimezoneAwareExpressionResolver with the given expression resolver.

    expressionResolver

    The ExpressionResolver used to resolve child expressions.

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. val ansiTransformations: Transformations
    Attributes
    protected
    Definition Classes
    CoercesExpressionTypes
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. def coerceExpressionTypes(expression: Expression, expressionTreeTraversal: ExpressionTreeTraversal): Expression

    Coerces the expression types by applying necessary transformations on the expression and its children.

    Coerces the expression types by applying necessary transformations on the expression and its children. Because fixed-point sometimes resolves type coercion in multiple passes, we apply each provided transformation twice, cyclically, to ensure that types are resolved. For example in a query like:

    SELECT '1' + '1'

    fixed-point analyzer requires two passes to resolve types.

    In the end, we apply DefaultCollationTypeCoercion. See DefaultCollationTypeCoercion doc for more info.

    Additionally, we copy the tags and origin in case the call to this method didn't come from ExpressionResolver, where they are copied generically.

    Definition Classes
    CoercesExpressionTypes
  8. 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
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. def getQueryContext(context: QueryContext): Array[QueryContext]
    Definition Classes
    DataTypeErrorsBase
  13. def getSummary(sqlContext: QueryContext): String
    Definition Classes
    DataTypeErrorsBase
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. val nonAnsiTransformations: Transformations
    Attributes
    protected
    Definition Classes
    CoercesExpressionTypes
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. def ordinalNumber(i: Int): String
    Definition Classes
    QueryErrorsBase
  21. def quoteByDefault(elem: String): String
    Attributes
    protected[sql]
    Definition Classes
    DataTypeErrorsBase
  22. def resolve(unresolvedTimezoneExpression: TimeZoneAwareExpression): Expression

    Resolves a TimeZoneAwareExpression by resolving its children, applying a timezone and calling coerceExpressionTypes on the result.

    Resolves a TimeZoneAwareExpression by resolving its children, applying a timezone and calling coerceExpressionTypes on the result. If the expression is a Cast, we apply collapseCast to the result.

    unresolvedTimezoneExpression

    The TimeZoneAwareExpression to resolve.

    returns

    A resolved Expression with the session's local timezone applied, and optionally type coerced.

    Definition Classes
    TimezoneAwareExpressionResolver → TreeNodeResolver
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toDSOption(option: String): String
    Definition Classes
    DataTypeErrorsBase
  25. def toSQLConf(conf: String): String
    Definition Classes
    DataTypeErrorsBase
  26. def toSQLConfVal(conf: String): String
    Definition Classes
    QueryErrorsBase
  27. def toSQLExpr(e: Expression): String
    Definition Classes
    QueryErrorsBase
  28. def toSQLId(parts: Seq[String]): String
    Definition Classes
    DataTypeErrorsBase
  29. def toSQLId(parts: String): String
    Definition Classes
    DataTypeErrorsBase
  30. def toSQLStmt(text: String): String
    Definition Classes
    DataTypeErrorsBase
  31. def toSQLType(t: AbstractDataType): String
    Definition Classes
    DataTypeErrorsBase
  32. def toSQLType(text: String): String
    Definition Classes
    DataTypeErrorsBase
  33. def toSQLValue(v: Any, t: DataType): String
    Definition Classes
    QueryErrorsBase
  34. def toSQLValue(value: Double): String
    Definition Classes
    DataTypeErrorsBase
  35. def toSQLValue(value: Float): String
    Definition Classes
    DataTypeErrorsBase
  36. def toSQLValue(value: Long): String
    Definition Classes
    DataTypeErrorsBase
  37. def toSQLValue(value: Int): String
    Definition Classes
    DataTypeErrorsBase
  38. def toSQLValue(value: Short): String
    Definition Classes
    DataTypeErrorsBase
  39. def toSQLValue(value: UTF8String): String
    Definition Classes
    DataTypeErrorsBase
  40. def toSQLValue(value: String): String
    Definition Classes
    DataTypeErrorsBase
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  43. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  45. def withResolvedChildren(unresolvedExpression: Expression, resolveChild: (Expression) => Expression): Expression

    Resolves generic Expression children and returns its copy with children resolved.

    Resolves generic Expression children and returns its copy with children resolved.

    We avoid extra method calls here, because resolveChild usually recurses deeply into resolution, and expression trees may be quite deep.

    Attributes
    protected
    Definition Classes
    ResolvesExpressionChildren
  46. def withResolvedChildren(unresolvedExpression: QuaternaryExpression, resolveChild: (Expression) => Expression): Expression

    Resolves QuaternaryExpression children and returns its copy with children resolved.

    Resolves QuaternaryExpression children and returns its copy with children resolved.

    Attributes
    protected
    Definition Classes
    ResolvesExpressionChildren
  47. def withResolvedChildren(unresolvedExpression: TernaryExpression, resolveChild: (Expression) => Expression): Expression

    Resolves TernaryExpression children and returns its copy with children resolved.

    Resolves TernaryExpression children and returns its copy with children resolved.

    Attributes
    protected
    Definition Classes
    ResolvesExpressionChildren
  48. def withResolvedChildren(unresolvedExpression: BinaryExpression, resolveChild: (Expression) => Expression): Expression

    Resolves BinaryExpression children and returns its copy with children resolved.

    Resolves BinaryExpression children and returns its copy with children resolved.

    Attributes
    protected
    Definition Classes
    ResolvesExpressionChildren
  49. def withResolvedChildren(unresolvedExpression: UnaryExpression, resolveChild: (Expression) => Expression): Expression

    Resolves UnaryExpression children and returns its copy with children resolved.

    Resolves UnaryExpression children and returns its copy with children resolved.

    Attributes
    protected
    Definition Classes
    ResolvesExpressionChildren
  50. 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 CoercesExpressionTypes

Inherited from QueryErrorsBase

Inherited from DataTypeErrorsBase

Inherited from SQLConfHelper

Inherited from AnyRef

Inherited from Any

Ungrouped