Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1475

MongoDB storage plugin errors with sum/avg functions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.6.0
    • 0.6.0
    • None
    • None

    Description

      Using the latest code from Apache Drill 0.6 branch and hitting issues with the mongodb plugin.
      Dataset is used is the mongo DB zips dataset.

      0: jdbc:drill:zk=local> select state, sum(pop) from zips group by state order by state;
      Query failed: Failure while running fragment. Invalid value for boolean: 15338 [8b6073af-a6ba-4516-ad9b-144f486c548c]

      Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0)
      0: jdbc:drill:zk=local> select state, avg(pop) from zips group by state order by state;
      Query failed: Failure while running fragment. Invalid value for boolean: 15338 [79d074a9-6299-4e8c-8ca4-aedef3873c49]

      Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0)

      -------
      Explain plan output.

      0: jdbc:drill:zk=local> explain plan for select state, avg(pop) from zips group by state order by state;
      ----------------------+

      text json

      ----------------------+

      00-00 Screen
      00-01 Project(state=[$0], EXPR$1=[$1])
      00-02 SelectionVectorRemover
      00-03 Sort(sort0=[$0], dir0=[ASC])
      00-04 Project(state=[$0], EXPR$1=[CAST(/(CastHigh(CASE(=($2, 0), null, $1)), $2)):ANY])
      00-05 HashAgg(group=[{0}], agg#0=[$SUM0($1)], agg#1=[COUNT($1)])
      00-06 Project(state=[$1], pop=[$0])
      00-07 Scan(groupscan=[MongoGroupScan [MongoScanSpec=MongoScanSpec [dbName=newzipdb, collectionName=zips, filters=null], columns=[SchemaPath [`state`], SchemaPath [`pop`]]]])
      {
      "head" :
      Unknown macro: { "version" }

      ,
      "graph" : [

      Unknown macro: { "pop" }

      ,

      Unknown macro: { "pop" }

      ,

      Unknown macro: { "pop" }

      ,

      Unknown macro: { "pop" }

      ,

      Unknown macro: { "pop" }

      ,

      { "pop" : "selection-vector-remover", "@id" : 2, "child" : 3, "initialAllocation" : 1000000, "maxAllocation" : 10000000000, "cost" : 2935.3 }

      ,

      Unknown macro: { "pop" }

      ,

      { "pop" : "screen", "@id" : 0, "child" : 1, "initialAllocation" : 1000000, "maxAllocation" : 10000000000, "cost" : 2935.3 }

      ]
      }

      ----------------------+

      Attachments

        Activity

          People

            akumarb2010 AnilKumar B
            Neeraja Neeraja
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: