Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-8367

from_unixtime Bad date/time conversion format: u on NULL value

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: Impala 2.11.0
    • Fix Version/s: None
    • Component/s: Backend
    • Labels:
    • Environment:
      impalad version 2.11.0-cdh5.14.2 RELEASE (build ed85dce709da9557aeb28be89e8044947708876c) Built on Tue Mar 27 13:39:48 PDT 2018
    • Epic Color:
      ghx-label-4

      Description

      The function

       from_unixtime(bigint unixtime[, string format]) 

      output error if the value of unixtime is NULL and format is 'u'.

       

      This doesn't work:

      SELECT FROM_UNIXTIME(NULL, 'u')
      
      Bad date/time conversion format: u

       

      This works:

      SELECT FROM_UNIXTIME(NULL, 'yyyy-MM-dd')
      
      |from_unixtime(null, 'yyyy-mm-dd')|
      |---------------------------------|
      | NULL                            |
      |---------------------------------|

       

      I haven't checked all the possible combinations.
      Other software like Hive handles this correctly.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mellowonpsx Sergio Leoni
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: