You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Hanifi Gunes (JIRA)" <ji...@apache.org> on 2015/05/22 22:18:17 UTC

[jira] [Updated] (DRILL-1760) Count on a map fails with SchemaChangeException

     [ https://issues.apache.org/jira/browse/DRILL-1760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hanifi Gunes updated DRILL-1760:
--------------------------------
    Issue Type: Improvement  (was: Bug)

> Count on a map fails with SchemaChangeException
> -----------------------------------------------
>
>                 Key: DRILL-1760
>                 URL: https://issues.apache.org/jira/browse/DRILL-1760
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Functions - Drill
>            Reporter: Hanifi Gunes
>            Assignee: Hanifi Gunes
>            Priority: Minor
>             Fix For: Future
>
>
> Take yelp business dataset and run
> {code:sql}
> select count(attributes) from dfs.`/path/to/yelp-business.json`
> {code}
> you should read
> {code:java}
> org.apache.drill.exec.exception.SchemaChangeException: Failure while materializing expression. 
> Error in expression at index -1.  Error: Missing function implementation: [count(MAP-REQUIRED)].  Full expression: --UNKNOWN EXPRESSION--.
> 	at org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.createAggregatorInternal(StreamingAggBatch.java:221) [classes/:na]
> 	at org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.createAggregator(StreamingAggBatch.java:173) [classes/:na]
> 	at org.apache.drill.exec.physical.impl.aggregate.StreamingAggBatch.buildSchema(StreamingAggBatch.java:89) [classes/:na]
> 	at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.buildSchema(IteratorValidatorBatchIterator.java:80) [classes/:na]
> 	at org.apache.drill.exec.record.AbstractSingleRecordBatch.buildSchema(AbstractSingleRecordBatch.java:109) [classes/:na]
> 	at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.buildSchema(IteratorValidatorBatchIterator.java:80) [classes/:na]
> 	at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.buildSchema(RemovingRecordBatch.java:64) [classes/:na]
> 	at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.buildSchema(IteratorValidatorBatchIterator.java:80) [classes/:na]
> 	at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.buildSchema(ScreenCreator.java:95) [classes/:na]
> 	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:111) [classes/:na]
> 	at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:249) [classes/:na]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65]
> 	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
> {code}
> I would expect to be able run count query on `attributes` field given that I can run a select on the same field.



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