kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "peng.jianhua (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KYLIN-3119) Fix a few bugs in the function 'massageSql' of 'QueryUtil.java'
Date Wed, 20 Dec 2017 08:04:00 GMT

     [ https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

peng.jianhua updated KYLIN-3119:
--------------------------------
    Description: 
in 
{code:java}
        while (sql.endsWith(";"))
            sql = sql.substring(0, sql.length() - 1);
{code}

{code:java}
        if (limit > 0 && !sql.toLowerCase().contains("limit")) {
            sql += ("\nLIMIT " + limit);
        }

        if (offset > 0 && !sql.toLowerCase().contains("offset")) {
            sql += ("\nOFFSET " + offset);
        }
{code}

{code:java}
        // https://issues.apache.org/jira/browse/KYLIN-2649
        if (kylinConfig.getForceLimit() > 0 && !sql.toLowerCase().contains("limit")
                && sql.toLowerCase().contains("*")) {
            sql += ("\nLIMIT " + kylinConfig.getForceLimit());
        }
{code}



  was:

{code:java}
        while (sql.endsWith(";"))
            sql = sql.substring(0, sql.length() - 1);
{code}

{code:java}
        if (limit > 0 && !sql.toLowerCase().contains("limit")) {
            sql += ("\nLIMIT " + limit);
        }

        if (offset > 0 && !sql.toLowerCase().contains("offset")) {
            sql += ("\nOFFSET " + offset);
        }
{code}

{code:java}
        // https://issues.apache.org/jira/browse/KYLIN-2649
        if (kylinConfig.getForceLimit() > 0 && !sql.toLowerCase().contains("limit")
                && sql.toLowerCase().contains("*")) {
            sql += ("\nLIMIT " + kylinConfig.getForceLimit());
        }
{code}




> Fix a few bugs in the function 'massageSql' of 'QueryUtil.java'
> ---------------------------------------------------------------
>
>                 Key: KYLIN-3119
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3119
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: peng.jianhua
>            Assignee: peng.jianhua
>
> in 
> {code:java}
>         while (sql.endsWith(";"))
>             sql = sql.substring(0, sql.length() - 1);
> {code}
> {code:java}
>         if (limit > 0 && !sql.toLowerCase().contains("limit")) {
>             sql += ("\nLIMIT " + limit);
>         }
>         if (offset > 0 && !sql.toLowerCase().contains("offset")) {
>             sql += ("\nOFFSET " + offset);
>         }
> {code}
> {code:java}
>         // https://issues.apache.org/jira/browse/KYLIN-2649
>         if (kylinConfig.getForceLimit() > 0 && !sql.toLowerCase().contains("limit")
>                 && sql.toLowerCase().contains("*")) {
>             sql += ("\nLIMIT " + kylinConfig.getForceLimit());
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message