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

Codegen does not catch exceptions in FROM_UNIXTIME()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Impala 2.2, Impala 2.3.0
    • Fix Version/s: Impala 2.5.0, Impala 2.3.4
    • Component/s: Backend
    • Environment:
      CentOS 6.5/CDH 5.4.2

      impalad version 2.2.0-cdh5.4.2 RELEASE (build b7f0e80e29971632ae1c422243d56c9ef65b8c5b)
      Built on Tue, 19 May 2015 17:00:53 PST

      Description

      Querying for the min or max value of a timestamp cast from a bigint via from_unixtime fails silently and crashes nodes when the input includes a value outside of the valid range.

      Steps to reproduce:

      > select * from times; 
      Query: select * from times
      1429705108399870 
      1429704907057354
      Fetched 2 row(s) in 0.38s
      
      > select min(from_unixtime(ts)) from times;
      Query: select min(from_unixtime(ts)) from times
      > (Query fails silently) 
      > select max(from_unixtime(ts)) from times;
      Query: select max(from_unixtime(ts)) from times
      > (Query also fails silently)
      

      In the web frontend, the query profiles show the "Cancelled due to unreachable impalad(s)" exception. impalad.ERROR on the unreachable/crashed nodes contains the following:

      terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::gregorian::bad_year> >'
        what():  Year is out of valid range: 1400..10000 
      

      Workaround
      Disable codegen with:

      SET disable_codegen=true;
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                skye Skye Wanderman-Milne
                Reporter:
                cflowers@varickmm.com_impala_259e Charlie Flowers
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: