Packages

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. Protected

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. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def hash(value: Any, dataType: DataType, seed: Long, isCollationAware: Boolean, legacyCollationAwareHashing: Boolean): Long

    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. The isCollationAware boolean flag indicates whether hashing should take a string's collation into account. If not, the bytes of the string are hashed, otherwise the collation key of the string is hashed.

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

    This method is intended for callers using the old hash API and preserves compatibility for supported data types.

    This method is intended for callers using the old hash API and preserves compatibility for supported data types. It must only be used for data types that do not include collated strings or complex types (e.g., structs, arrays, maps) that may contain collated strings.

    The caller is responsible for ensuring that dataType does not involve collation-aware fields. This is validated via an internal assertion.

    Definition Classes
    InterpretedHashFunction
    Exceptions thrown

    IllegalArgumentException if dataType contains non-UTF8 binary collation.

  11. def hashCalendarInterval(calendarInterval: CalendarInterval): Long

    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)

    e.g. (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 (i.e. non adherent with Hive output)

  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. def hashInt(i: Int, seed: Long): Long
    Attributes
    protected
    Definition Classes
    HiveHashFunctionInterpretedHashFunction
  14. def hashLong(l: Long, seed: Long): Long
    Attributes
    protected
    Definition Classes
    HiveHashFunctionInterpretedHashFunction
  15. def hashTimestamp(timestamp: Long): Long

    Mimics TimestampWritable.hashCode() in Hive

  16. def hashUnsafeBytes(base: AnyRef, offset: Long, len: Int, seed: Long): Long
    Attributes
    protected
    Definition Classes
    HiveHashFunctionInterpretedHashFunction
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def normalizeDecimal(input: BigDecimal): BigDecimal
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

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 AnyRef

Inherited from Any

Ungrouped