You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "peng.jianhua (JIRA)" <ji...@apache.org> on 2017/12/20 08:04:00 UTC
[jira] [Updated] (KYLIN-3119) Fix a few bugs in the function
'massageSql' of 'QueryUtil.java'
[ https://issues.apache.org/jira/browse/KYLIN-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
peng.jianhua updated KYLIN-3119:
--------------------------------
Summary: Fix a few bugs in the function 'massageSql' of 'QueryUtil.java' (was: Fix a few bugs in function 'massageSql' of 'QueryUtil.java')
> 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
>
> {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)