Object

org.apache.spark.sql.catalyst.expressions

HiveHashFunction

Related Doc: package expressions

Permalink

object HiveHashFunction extends InterpretedHashFunction

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HiveHashFunction
  2. InterpretedHashFunction
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hash(value: Any, dataType: DataType, seed: Long): Long

    Permalink

    Computes hash of a given value of type dataType.

    Computes hash of a given value of type dataType. The caller needs to check the validity of input value.

    Definition Classes
    HiveHashFunctionInterpretedHashFunction
  11. def hashCalendarInterval(calendarInterval: CalendarInterval): Long

    Permalink

    Hive allows input intervals to be defined using units below but the intervals have to be from the same category: - year, month (stored as HiveIntervalYearMonth) - day, hour, minute, second, nanosecond (stored as HiveIntervalDayTime)

    Hive allows input intervals to be defined using units below but the intervals have to be from the same category: - year, month (stored as HiveIntervalYearMonth) - day, hour, minute, second, nanosecond (stored as HiveIntervalDayTime)

    eg. (INTERVAL '30' YEAR + INTERVAL '-23' DAY) fails in Hive

    This method mimics HiveIntervalDayTime.hashCode() in Hive.

    Two differences wrt Hive due to how intervals are stored in Spark vs Hive:

    - If the INTERVAL is backed as HiveIntervalYearMonth in Hive, then this method will not produce Hive compatible result. The reason being Spark's representation of calendar does not have such categories based on the interval and is unified.

    - Spark's CalendarInterval has precision upto microseconds but Hive's HiveIntervalDayTime can store data with precision upto nanoseconds. So, any input intervals with nanosecond values will lead to wrong output hashes (ie. non adherent with Hive output)

  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashInt(i: Int, seed: Long): Long

    Permalink
    Attributes
    protected
    Definition Classes
    HiveHashFunctionInterpretedHashFunction
  14. def hashLong(l: Long, seed: Long): Long

    Permalink
    Attributes
    protected
    Definition Classes
    HiveHashFunctionInterpretedHashFunction
  15. def hashTimestamp(timestamp: Long): Long

    Permalink

    Mimics TimestampWritable.hashCode() in Hive

  16. def hashUnsafeBytes(base: AnyRef, offset: Long, len: Int, seed: Long): Long

    Permalink
    Attributes
    protected
    Definition Classes
    HiveHashFunctionInterpretedHashFunction
  17. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    AnyRef
  19. def normalizeDecimal(input: BigDecimal): BigDecimal

    Permalink
  20. final def notify(): Unit

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

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

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

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

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

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

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

Inherited from InterpretedHashFunction

Inherited from AnyRef

Inherited from Any

Ungrouped