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

CAST(INTERVAL_DAY_TIME AS STRING) is throwing SemanticException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.0, 4.0.0
    • Component/s: UDF
    • Labels:
      None
    • Target Version/s:

      Description

      SELECT CAST(from_utc_timestamp(timestamp '2018-05-02 15:30:30', 'PST') - from_utc_timestamp(timestamp '1970-01-30 16:00:00', 'PST') AS STRING);

      throws below Exception

      Error: Error while compiling statement: FAILED: SemanticException Line 0:-1 Wrong arguments ''PST'': No matching method for class org.apache.hadoop.hive.ql.udf.UDFToString with (interval_day_time). Possible choices: _FUNC_(bigint)  _FUNC_(binary)  _FUNC_(boolean)  _FUNC_(date)  _FUNC_(decimal(38,18))  _FUNC_(double)  _FUNC_(float)  _FUNC_(int)  _FUNC_(smallint)  _FUNC_(string)  _FUNC_(timestamp)  _FUNC_(tinyint)  _FUNC_(void) (state=42000,code=40000)

        Attachments

        1. HIVE-20599-branch-3.patch
          4 kB
          Naresh P R
        2. HIVE-20599.4.patch
          2 kB
          Naresh P R
        3. HIVE-20599.3.patch
          2 kB
          Naresh P R
        4. HIVE-20599.2.patch
          2 kB
          Prasanth Jayachandran
        5. HIVE-20599.1-branch-3.patch
          4 kB
          Naresh P R
        6. HIVE-20599.1-branch-3.1.patch
          4 kB
          Naresh P R
        7. HIVE-20599.1.patch
          2 kB
          Naresh P R

          Activity

            People

            • Assignee:
              nareshpr Naresh P R
              Reporter:
              nareshpr Naresh P R
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: