Hey Madhu, Could you try and rewrite the query - something like as shown below:
> select t.f.`name` from (select flatten(fillings) as f from dfs.`/Users/Development/BigData/RS/json/test.json`) t where t.f.`name`='sugar' ; This could be possibly related to DRILL-2208 <https://issues.apache.org/jira/browse/DRILL-2208> Regards, Abhishek On Mon, Mar 2, 2015 at 7:11 PM, Jahagirdar, Madhu < [email protected]> wrote: > All, > > > I am getting below error just executing simple statement on flatten, let > me know if its bug or something I am doing wrong > > > select flatten(fillings) as f > > from dfs.`/Users/philips/Development/BigData/RS/json/test.json` > > where f.cal>300 > > ; > > > JSON: > > {"name":"classic","fillings":[{"name":"sugar","cal":500}]} > > > ERROR: > > Error: exception while executing query: Failure while executing query. > (state=,code=0) > > 0: jdbc:drill:zk=local> select flatten(fillings) as f > > . . . . . . . . . . . > from > dfs.`/Users/Development/BigData/RS/json/test.json` > > . . . . . . . . . . . > where f.name='sugar' > > . . . . . . . . . . . > ; > > Mar 03, 2015 7:47:03 AM org.eigenbase.sql.validate.SqlValidatorException > <init> > > SEVERE: org.eigenbase.sql.validate.SqlValidatorException: Table 'f' not > found > > Mar 03, 2015 7:47:03 AM org.eigenbase.util.EigenbaseException <init> > > SEVERE: org.eigenbase.util.EigenbaseContextException: At line 3, column 9: > Table 'f' not found > > Query failed: Query failed: Failure validating SQL. > org.eigenbase.util.EigenbaseContextException: At line 3, column 9: Table > 'f' not found > > > Error: exception while executing query: Failure while executing query. > (state=,code=0) > > > Regards, > > Madhu Jahagirdar > > ________________________________ > The information contained in this message may be confidential and legally > protected under applicable law. The message is intended solely for the > addressee(s). If you are not the intended recipient, you are hereby > notified that any use, forwarding, dissemination, or reproduction of this > message is strictly prohibited and may be unlawful. If you are not the > intended recipient, please contact the sender by return e-mail and destroy > all copies of the original message. > -- Abhishek Girish Senior Software Engineer (408) 476-9209 <http://www.mapr.com/> Now Available - Free Hadoop On-Demand Training <http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available>
