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

Broken Druid query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.9.0
    • None

    Description

      There are several errors while executing the following query generated by Mondrian against the Druid adapter:

      select "wikiticker"."countryName" as "c0",
       sum("wikiticker"."count") as "m1",
       sum("wikiticker"."deleted") as "m2",
       sum("wikiticker"."delta") as "m3"
      from "wiki" as "wikiticker"
      where ("wikiticker"."countryName" in ('Colombia', 'France', 'Germany', 'India', 'Italy', 'Russia', 'United Kingdom', 'United States')
       or "wikiticker"."countryName" is null)
      group by "wikiticker"."countryName"
      

      Issues:

      • SqlToRelConverter incorrectly casts each of the string literals to VARCHAR(1) to match LHS of IN (e.g. 'Columbia' gets truncated to 'C')
      • SUM does not work on BIGINT columns, only INTEGER
      • ArrayIndexOutOfBoundsException in AggregateNode when building key values

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: