Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If set to true, order/sort by without limit in subqueries and views will be removed.

Datetime

hive.datetime.formatter
  • Default Value: DATETIME
  • Added In: Hive 4.0.0 with
    Jira
    serverASF JIRA
    serverId5aa69414-a9e9-3523-82ec-879b028fb15b
    keyHIVE-25576
    ,
    Jira
    serverASF JIRA
    serverId5aa69414-a9e9-3523-82ec-879b028fb15b
    keyHIVE-27673

The formatter to use for handling datetime values. The possible values are:

  • DATETIME: For using java.time.format.DateTimeFormatter
  • SIMPLE: For using java.text.SimpleDateFormat (known bugs: HIVE-25458, HIVE-25403, HIVE-25268)
hive.datetime.formatter.resolver.style
  • Default Value: SMART
  • Added in: Hive 4.0.0 with HIVE-27772 

The style used by the hive.datetime.formatter (only applicable to DATETIME) to resolve dates amd times. The possible values are:

  • SMART:
    • Using smart resolution will perform the sensible default for each field, which may be the same as strict, the same as lenient, or a third behavior. Individual fields will interpret this differently.
    • For example, resolving year-month and day-of-month in the ISO calendar system using smart mode will ensure that the day-of-month is from 1 to 31, converting any value beyond the last valid day-of-month to be the last valid day-of-month.
  • STRICT:
    • Using strict resolution will ensure that all parsed values are within the outer range of valid values for the field. Individual fields may be further processed for strictness.
    • For example, resolving year-month and day-of-month in the ISO calendar system using strict mode will ensure that the day-of-month is valid for the year-month, rejecting invalid values.
    • When using Strict as the hive.datetime.formatter.resolver.style we should use the pattern "u" to represent year. For more details, please refer: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html  
  • LENIENT:
    • Lenient mode allows the month in the ISO calendar system to be outside the range 1 to 12. For example, month 15 is treated as being 3 months after month 12.

Currently these configuration only affects the behavior of the following SQL functions:

  • unix_timestamp(string,[string])
  • from_unixtime
  • date_format

The SIMPLE formatter exists purely for compatibility purposes with previous versions of Hive thus its use is discouraged. It suffers from known bugs that are unlikely to be fixed in subsequent versions of the product. Furthermore, using SIMPLE formatter may lead to strange behavior, and unexpected results when combined with SQL functions/operators that are using the new DATETIME formatter.

SerDes and ISerDes and I/O

SerDes

hive.script.serde

...