[ 
https://issues.apache.org/jira/browse/DRILL-8290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17679170#comment-17679170
 ] 

ASF GitHub Bot commented on DRILL-8290:
---------------------------------------

jnturton commented on PR #2636:
URL: https://github.com/apache/drill/pull/2636#issuecomment-1398472306

   > For such queries the same QueryComputationHints will be used for both 
inputs, so it will cause incorrect results.
   
   @vvysotskyi the idea here was that only a LIMIT 0 on the _root_ SELECT is 
detected, in which case the single file optimisation can be done on _all_ 
inputs so a single flag is sufficient.
   
   However, I'm trying to implement a better approach that optimises LIMIT 0s 
at any level. Since files are first listed very early, during validation (so 
even before partition pruning 🙁) no RelNode trees are available and the 
detection will have to be done on the SqlNode tree.




> Short cut recursive file listings for LIMIT 0 queries
> -----------------------------------------------------
>
>                 Key: DRILL-8290
>                 URL: https://issues.apache.org/jira/browse/DRILL-8290
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Query Planning & Optimization
>    Affects Versions: 1.20.2
>            Reporter: James Turton
>            Priority: Minor
>             Fix For: 1.21.0
>
>
> The existing LIMIT 0 query optimisations do not prevent a query run against 
> the top of a deep DFS directory tree from recursively listing FileStatuses 
> for everything within it using a pool of worker threads. This Issue proposes 
> a new optimisation whereby such queries will recurse into the directory tree 
> on a single thread that returns as soon as any single FileStatus has been 
> obtained.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to