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

Druidhandler may miss results when time constrainted by and/ors

    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

      Description

      For the following query:

      FROM druid_table_alltypesorc
      WHERE ('1968-01-01 00:00:00' <= `__time` AND `__time` <= '1970-01-01 00:00:00')
          OR ('1968-02-01 00:00:00' <= `__time` AND `__time` <= '1970-04-01 00:00:00') ORDER BY `__time` ASC LIMIT 10;
      

      the druid query is:

      druid.query.json {"queryType":"scan","dataSource":"default.druid_table_alltypesorc","intervals":["1900-01-01T00:00:00.000Z/1968-02-01T08:00:00.001Z"],"virtualColumns":[{"type":"expression","name":"vc","expression":"\"__time\"","outputType":"LONG"}],"columns":["vc"],"resultFormat":"compactedList"}
      

      which has an invalid interval: "intervals":["1900-01-01T00:00:00.000Z/1968-02-01T08:00:00.001Z" which prevents valid results from 1969 to appear.

      note: using between the interval is handled correctly

        Attachments

        1. add_test.patch
          2 kB
          Zoltan Haindrich

          Issue Links

            Activity

              People

              • Assignee:
                kgyrtkirk Zoltan Haindrich
                Reporter:
                kgyrtkirk Zoltan Haindrich
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: