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

Druid Needs Explicit CASTs from Timestamp to STRING when the output of timestamp function is used as String

    XMLWordPrintableJSON

    Details

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

      Description

      Druid time expressions return numeric values in form of ms (instead of formatted timestamp). Because of this expressions/function which expects its argument as string type ended up returning different values for time expressions input.

      e.g. 

      SELECT SUBSTRING(to_date(datetime0),4) FROM tableau_orc.calcs;
      | 4-07-25  |
      
      SELECT SUBSTRING(to_date(datetime0),4) FROM druid_tableau.calcs;
      | 0022400000  |
      
      SELECT CONCAT(to_date(datetime0),' 00:00:00') FROM tableau_orc.calcs;
      | 2004-07-17 00:00:00  |
      
      SELECT CONCAT(to_date(datetime0),' 00:00:00') FROM druid_tableau.calcs;
      | 1090454400000 00:00:00  |
       

      Druid needs explicit cast to make this work

        Attachments

        1. HIVE-20340.1.patch
          7 kB
          Vineet Garg
        2. HIVE-20340.2.patch
          7 kB
          Vineet Garg
        3. HIVE-20340.3.patch
          28 kB
          Vineet Garg

          Issue Links

            Activity

              People

              • Assignee:
                vgarg Vineet Garg
                Reporter:
                vgarg Vineet Garg
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: