Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1188

NullPointerException in EXTRACT with WHERE ... IN clause if field has null value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.16.0
    • Component/s: None
    • Labels:

      Description

      if there was a timestamp or date field F1, the queries below will throw nullpointer exception if F1 has null value

      select extract(year from F1) from T where extract(year from F1) in (2004, 2005)

      select extract(year from F1) , count(0) from T where extract(year from F1) in (2004, 2005) group by extract(year from F1)

      the number of items in WHERE-IN clause must be equal or more than two

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                Droopyhu Wei Hu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: