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

Bug in the Druid Filter Translation when Comparing String Ref to a Constant Number

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • druid-adapter
    • None

    Description

      The following query

       SELECT COUNT(*) FROM  \"foodmart\"  WHERE \"product_id\" = 16.0

      Translates to a Druid Table Scan with a String to String Selector comparison filter.
      instead we need to have a Bound filter that cast the String to number.
      This is what we should expect.

       
      {"type":"bound","dimension":"product_id","lower":"16.0","lowerStrict":false,"upper":"16.0","upperStrict":false,"ordering":"numeric"}
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bslim Slim Bouguerra
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: