drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudip Mukherjee <smukher...@commvault.com>
Subject RE: Apache Drill: How does the plug-in know that an aggregate function is applied
Date Tue, 11 Aug 2015 13:03:42 GMT

Thanks a lot for this. I could use isSkipQuery for the count(*) in sql statement. Need to
figure out if I can optimize the solr query (if applicable) for other aggregate functions
like SUM where I can use a simple stats query on the given field.


-----Original Message-----
From: Hanifi Gunes [mailto:hgunes@maprtech.com] 
Sent: 10 August 2015 PM 11:27
To: user; dev@drill.apache.org
Subject: Re: Apache Drill: How does the plug-in know that an aggregate function is applied


+1 to Hakim. AbstractRR#isSkipQuery is the way to go. If you want more
details on this you should check out DRILL-2358[1] that is an umbrella issue targeting to
make count(*) queries more efficient per storage plugin.
Currently (I guess) JSON and Mongo(?) readers support it though.


On Thu, Aug 6, 2015 at 6:50 PM, Abdel Hakim Deneche <adeneche@maprtech.com>

> Hi Sudip,
> I'm not really an expert in this matter but I came recently across
> isSkipQuery() method in AbstractRecordReader, it's javadoc states:
> *Returns true if reader should skip all of the columns, reporting 
> number of
> > records only. Handling of a skip query is storage plugin-specific.*
> You can take a look at JSONRecordReader for an example on how to use
> isSkipQuery() to optimize the reading.
> Thanks
> On Thu, Aug 6, 2015 at 2:01 AM, Sudip Mukherjee < 
> mukherjeesudip1@hotmail.com
> > wrote:
> > Hi,
> > I am using apache drill recently with mongodb and trying to write a 
> > basic plug-in for apache solr. Wanted to know how does the plug-in 
> > know that an
> > count(*) query has been applied so that the query to data-source can 
> > be optimized? Can i get it if I extend  AbstractExprVisitor class?
> >
> > Thanks,Sudip Mukherjee
> --
> Abdelhakim Deneche
> Software Engineer
>   <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
> >

***************************Legal Disclaimer***************************
"This communication may contain confidential and privileged material for the
sole use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message by mistake,
please advise the sender by reply email and delete the message. Thank you."
View raw message