Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-24157

Strict mode to fail on CAST timestamp <-> numeric

    XMLWordPrintableJSON

Details

    Description

      There is some interest in enforcing that CAST numeric <-> timestamp is disallowed to avoid confusion among users, e.g., SQL standard does not allow numeric <-> timestamp casting, timestamp type is timezone agnostic, etc.

      We should introduce a strict config for timestamp (similar to others before): If the config is true, we shall fail while compiling the query with a meaningful message.

      To provide similar behavior, Hive has multiple functions that provide clearer semantics for numeric to timestamp conversion (and vice versa):
      https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions

      Attachments

        Issue Links

          Activity

            People

              kgyrtkirk Zoltan Haindrich
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m