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

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

vvysotskyi commented on pull request #1936: DRILL-7490: LIMIT is not pushed to 
JDBC storage plugin
URL: https://github.com/apache/drill/pull/1936
 
 
   See [DRILL-7490](https://issues.apache.org/jira/browse/DRILL-7490) for 
details.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> limit is not pushed to JDBC storage plugin
> ------------------------------------------
>
>                 Key: DRILL-7490
>                 URL: https://issues.apache.org/jira/browse/DRILL-7490
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Client - JDBC
>    Affects Versions: 1.11.0
>            Reporter: Vova Vysotskyi
>            Assignee: Vova Vysotskyi
>            Priority: Major
>             Fix For: 1.18.0
>
>
> The limit is not pushed to JDBC storage plugin. 
> The following query:
> {code:sql}
> select person_id from mysql.`drill_mysql_test`.person limit 10
> {code}
> Returns plan:
> {noformat}
> 00-00    Screen
> 00-01      Project(person_id=[$0])
> 00-02        SelectionVectorRemover
> 00-03          Limit(fetch=[10])
> 00-04            Limit(fetch=[10])
> 00-05              Jdbc(sql=[SELECT `person_id` FROM 
> `drill_mysql_test`.`person` ])
> {noformat}
> This issue happens since incorrect row count is calculated for {{JdbcSort}}.
> Drill enforces to use {{RelNode.estimateRowCount(mq)}} for calculating row 
> count for all inheritants of {{Sort}} rel node (see {{DrillRelMdRowCount}}), 
> but {{JdbcSort}} doesn't override this method and uses parent one which 
> returns row count of input. So planner choses {{DrillLimitRel}} since it has 
> less row count.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to