Hi Rahul,

Drill has *DrillPushLimitToScanRule* [1] rule, which should do this
optimization, whether the GroupScan supports Limit Push Down.
Also you can verify in debug mode whether this rule is fired.
Possibly for some external DB (like MapR-DB) Drill should have the separate
class for this optimization [2].

[1]
https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillPushLimitToScanRule.java#L28
[2]
https://github.com/apache/drill/pull/1466/files#diff-4819b70118487d81bc9c46a04b0eaaa3R37

On Fri, Oct 12, 2018 at 3:19 PM Rahul Raj <rahul....@option3.io> wrote:

> Hi,
>
> Drill does not push the LIMIT queries to external databases and I assume it
> could be more related to Calcite. This leads to out of memory situations
> while querying large table to view few records.  Is there something that
> could be improved here? One solutions would be to push filters down to the
> DB and/or combined with some JDBC batch size limit to flush a part as
> parquet.
>
> Regards,
> Rahul
>
> --
> _*** This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom it is
> addressed. If you are not the named addressee then you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately and delete this e-mail from your system.***_
>

Reply via email to