Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4062

Too many "if else" clause in PushDownRunnerJdbcImpl#toSqlType

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v3.0.0-alpha2
    • Component/s: Query Engine
    • Labels:
      None

      Description

      In this method, it has 30 "if else" which is low efficient; Should use a static Hashmap, then only need 1 check.

       

      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
      ...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wangrupeng wangrupeng
                Reporter:
                shaofengshi Shao Feng Shi
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: