You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/07/04 03:27:00 UTC

[jira] [Commented] (KYLIN-4068) Automatically add limit has bug

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

ASF GitHub Bot commented on KYLIN-4068:
---------------------------------------

weibin0516 commented on pull request #729: [KYLIN-4068] append limit and offset to sql reliably
URL: https://github.com/apache/kylin/pull/729
 
 
   ## What changes were proposed in this pull request?
   Currently, there is a bug in sql conversion, as follow:
   
   ```sql
   SELECT E_Name FROM Employees_China
   UNION
   SELECT E_Name FROM Employees_USA
   ```
   
   will convert to
   
   ```sql
   SELECT E_Name FROM Employees_China
   UNION
   SELECT E_Name FROM Employees_USA
   LIMIT 50000
   ```
   
   This limit is not working on the result of union, but on SELECT E_Name FROM Employees_USA.
   We should use a more secure way to achieve the limit effect.
   
   This pr fixed the bug, making sure to append limit or offset after sql does not change sql semantics
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


> Automatically add limit has bug
> -------------------------------
>
>                 Key: KYLIN-4068
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4068
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v2.6.2
>            Reporter: weibin0516
>            Assignee: weibin0516
>            Priority: Major
>
> {code:sql}
> SELECT E_Name FROM Employees_China
> UNION
> SELECT E_Name FROM Employees_USA
> {code}
> will convert to 
> {code:sql}
> SELECT E_Name FROM Employees_China
> UNION
> SELECT E_Name FROM Employees_USA
> LIMIT 50000
> {code}
> This limit is not working on the result of union, but on SELECT E_Name FROM Employees_USA.
> We should use a more secure way to achieve the limit effect.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)