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

Too many "if else" clause in PushDownRunnerJdbcImpl#toSqlType

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • v3.0.0-alpha2
    • Query Engine
    • 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

              wangrupeng Wang Rupeng
              shaofengshi Shao Feng Shi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: