You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "王汝鹏 (JIRA)" <ji...@apache.org> on 2019/07/10 02:21:00 UTC
[jira] [Closed] (KYLIN-4062) Too many "if else" clause in
PushDownRunnerJdbcImpl#toSqlType
[ https://issues.apache.org/jira/browse/KYLIN-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
王汝鹏 closed KYLIN-4062.
----------------------
Resolution: Fixed
Fix Version/s: v2.6.3
v3.0.0
> Too many "if else" clause in PushDownRunnerJdbcImpl#toSqlType
> -------------------------------------------------------------
>
> Key: KYLIN-4062
> URL: https://issues.apache.org/jira/browse/KYLIN-4062
> Project: Kylin
> Issue Type: Improvement
> Components: Query Engine
> Reporter: Shaofeng SHI
> Assignee: 王汝鹏
> Priority: Minor
> Fix For: v3.0.0, v2.6.3
>
>
> In this method, it has 30 "if else" which is low efficient; Should use a static Hashmap, then only need 1 check.
>
> {code:java}
> if ("string".equalsIgnoreCase(type)) {
> return Types.VARCHAR;
> } else if ("varchar".equalsIgnoreCase(type)) {
> return Types.VARCHAR;
> } else if ("char".equalsIgnoreCase(type)) {
> return Types.CHAR;
> } else if
> ...{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)