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

Druid Adapter does not push the boolean operator "<>" as a filter correctly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.12.0
    • Fix Version/s: 1.13.0
    • Component/s: druid
    • Labels:
      None

      Description

      The query

      SELECT COUNT(DISTINCT "the_month") FROM "foodmart" WHERE "the_month" <> 'October';
      

      Will produce a Druid query with the following filter:

      "filter":{
            "type":"not",
            "fields":[
               {
                  "type":"selector",
                  "dimension":"the_month",
                  "value":"October"
               }
            ]
         }
      

      But the expected filter should look like:

      "filter":{
            "type":"not",
            "field":{
                  "type":"selector",
                  "dimension":"the_month",
                  "value":"October"
               }
         }
      

        Issue Links

          Activity

          Hide
          jcamachorodriguez Jesus Camacho Rodriguez added a comment -

          Resolved in release 1.13.0 (2017-06-26).

          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.13.0 (2017-06-26).
          Show
          jcamachorodriguez Jesus Camacho Rodriguez added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/d47191e8 . Thanks Zain Humayun !
          Hide
          zhumayun Zain Humayun added a comment -

          Added new commit that fixes the javadoc error.

          Show
          zhumayun Zain Humayun added a comment - Added new commit that fixes the javadoc error.
          Hide
          zhumayun Zain Humayun added a comment - - edited

          mvn site fails on project "calcite" with exit code 1.

          Any idea why is succeeds on the master branch, but not mine?

          Edit: I think i've found the problem

          Show
          zhumayun Zain Humayun added a comment - - edited mvn site fails on project "calcite" with exit code 1. Any idea why is succeeds on the master branch, but not mine? Edit: I think i've found the problem
          Hide
          julianhyde Julian Hyde added a comment -

          Try "mvn site", run under JDK 1.8 or 9 (which is stricter than JDK 7).

          Show
          julianhyde Julian Hyde added a comment - Try "mvn site", run under JDK 1.8 or 9 (which is stricter than JDK 7).
          Hide
          zhumayun Zain Humayun added a comment -

          I updated my PR to use enums.

          When I run mvn javadoc, an error tells me that "javadoc" is an unknown lifecycle phase.

          Show
          zhumayun Zain Humayun added a comment - I updated my PR to use enums. When I run mvn javadoc , an error tells me that "javadoc" is an unknown lifecycle phase.
          Hide
          julianhyde Julian Hyde added a comment -

          Consider changing JsonFilter.type from a String to an enum. We did this a while ago with Granularity.

          Also, I think there might a minor javadoc error. Run "mvn javadoc".

          I can't review/commit until I have a working Druid test VM.

          Show
          julianhyde Julian Hyde added a comment - Consider changing JsonFilter.type from a String to an enum. We did this a while ago with Granularity. Also, I think there might a minor javadoc error. Run "mvn javadoc". I can't review/commit until I have a working Druid test VM.
          Hide
          zhumayun Zain Humayun added a comment -

          Updated the PR based on your feedback.

          Show
          zhumayun Zain Humayun added a comment - Updated the PR based on your feedback.
          Hide
          bslim slim bouguerra added a comment -

          +1 Thanks.

          Show
          bslim slim bouguerra added a comment - +1 Thanks.
          Hide
          zhumayun Zain Humayun added a comment -
          Show
          zhumayun Zain Humayun added a comment - Created PR: https://github.com/apache/calcite/pull/464

            People

            • Assignee:
              zhumayun Zain Humayun
              Reporter:
              zhumayun Zain Humayun
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development