[
https://issues.apache.org/jira/browse/DRILL-6574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Arina Ielchiieva updated DRILL-6574:
------------------------------------
Description:
Currently we have early limit 0 optimization
(planner.enable_limit0_optimization) which determines query data types before
actual scan. Since we not always able to determine data type during planning,
we need to add one more option to enable late limit 0 optimization
(planner.enable_limit0_on_scan, exit query right after scan. LIMIT(0) on SCAN
for UNION and complex functions will be disabled i.e. UNION and complex
functions need data to produce result schema. Also this would not work for the
following list of functions: //todo add list of functions
Query plan examples:
// todo add two plans before and after the changes
Also both early and late limit 0 optimization will turn on by default.
was:
Currently prepare statements use LIMIT 0 to get the result schema. Adding
LIMIT(0) on top of SCAN causes an early termination of the query.
Create an option "planner.enable_limit0_on_scan", enabled by default. Change
"planner.enable_limit0_optimization" option to be enabled by default.
LIMIT(0) on SCAN for UNION and complex functions are disabled i.e. UNION and
complex functions need data to produce result schema.
If function is unsupported, the plan won't be affected.
> Add option to push LIMIT(0) on top of SCAN (late limit 0 optimization)
> ----------------------------------------------------------------------
>
> Key: DRILL-6574
> URL: https://issues.apache.org/jira/browse/DRILL-6574
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.13.0
> Reporter: Bohdan Kazydub
> Assignee: Bohdan Kazydub
> Priority: Major
> Labels: doc-impacting
>
> Currently we have early limit 0 optimization
> (planner.enable_limit0_optimization) which determines query data types before
> actual scan. Since we not always able to determine data type during planning,
> we need to add one more option to enable late limit 0 optimization
> (planner.enable_limit0_on_scan, exit query right after scan. LIMIT(0) on SCAN
> for UNION and complex functions will be disabled i.e. UNION and complex
> functions need data to produce result schema. Also this would not work for
> the following list of functions: //todo add list of functions
> Query plan examples:
> // todo add two plans before and after the changes
> Also both early and late limit 0 optimization will turn on by default.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)