drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "B Anil Kumar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1475) MongoDB storage plugin errors with sum/avg functions
Date Wed, 01 Oct 2014 04:59:33 GMT

    [ https://issues.apache.org/jira/browse/DRILL-1475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154353#comment-14154353
] 

B Anil Kumar commented on DRILL-1475:
-------------------------------------

I think this behavior should be updated on doc for the users benefit.

> MongoDB storage plugin errors with sum/avg functions
> ----------------------------------------------------
>
>                 Key: DRILL-1475
>                 URL: https://issues.apache.org/jira/browse/DRILL-1475
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Neeraja
>            Assignee: B Anil Kumar
>
> 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" : {
>     "version" : 1,
>     "generator" : {
>       "type" : "ExplainHandler",
>       "info" : ""
>     },
>     "type" : "APACHE_DRILL_PHYSICAL",
>     "options" : [ ],
>     "queue" : 0,
>     "resultMode" : "EXEC"
>   },
>   "graph" : [ {
>     "pop" : "mongo-scan",
>     "@id" : 7,
>     "mongoScanSpec" : {
>       "dbName" : "newzipdb",
>       "collectionName" : "zips",
>       "filters" : null
>     },
>     "storage" : {
>       "type" : "mongo",
>       "connection" : "mongodb://localhost:27017",
>       "enabled" : true
>     },
>     "columns" : [ "`state`", "`pop`" ],
>     "cost" : 29353.0
>   }, {
>     "pop" : "project",
>     "@id" : 6,
>     "exprs" : [ {
>       "ref" : "`state`",
>       "expr" : "`state`"
>     }, {
>       "ref" : "`pop`",
>       "expr" : "`pop`"
>     } ],
>     "child" : 7,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 29353.0
>   }, {
>     "pop" : "hash-aggregate",
>     "@id" : 5,
>     "child" : 6,
>     "cardinality" : 1.0,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 14676.5,
>     "groupByExprs" : [ {
>       "ref" : "`state`",
>       "expr" : "`state`"
>     } ],
>     "aggrExprs" : [ {
>       "ref" : "`$f1`",
>       "expr" : "$sum0(`pop`) "
>     }, {
>       "ref" : "`$f2`",
>       "expr" : "count(`pop`) "
>     } ]
>   }, {
>     "pop" : "project",
>     "@id" : 4,
>     "exprs" : [ {
>       "ref" : "`state`",
>       "expr" : "`state`"
>     }, {
>       "ref" : "`EXPR$1`",
>       "expr" : "divide(casthigh( ( if (equal(`$f2`, 0)  ) then (NULL )  else (`$f1` )
 end  ) ) , `$f2`) "
>     } ],
>     "child" : 5,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 2935.3
>   }, {
>     "pop" : "external-sort",
>     "@id" : 3,
>     "child" : 4,
>     "orderings" : [ {
>       "order" : "ASC",
>       "expr" : "`state`",
>       "nullDirection" : "UNSPECIFIED"
>     } ],
>     "reverse" : false,
>     "initialAllocation" : 20000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 2935.3
>   }, {
>     "pop" : "selection-vector-remover",
>     "@id" : 2,
>     "child" : 3,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 2935.3
>   }, {
>     "pop" : "project",
>     "@id" : 1,
>     "exprs" : [ {
>       "ref" : "`state`",
>       "expr" : "`state`"
>     }, {
>       "ref" : "`EXPR$1`",
>       "expr" : "`EXPR$1`"
>     } ],
>     "child" : 2,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 2935.3
>   }, {
>     "pop" : "screen",
>     "@id" : 0,
>     "child" : 1,
>     "initialAllocation" : 1000000,
>     "maxAllocation" : 10000000000,
>     "cost" : 2935.3
>   } ]
> } |
> +------------+------------+



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message