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

Avoid repeatedly calling "string.toLowerCase" in TimedJsonStreamParser#parse

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • NRT Streaming
    • None

    Description

      In TimedJsonStreamParser#parse, it has this:

       

      for (TblColRef column : allColumns) {
          final String columnName = column.getName().toLowerCase(Locale.ROOT);
          if (populateDerivedTimeColumns(columnName, result, t) == false) {
              result.add(getValueByKey(column, root));
          }
      }
      

       

      As this method will be invoked for each message, and then for each column it will have a "toLowerCase(Locale.ROOT)", which is unnecessary, because the "allColumns" won't change.

       

      Attachments

        Issue Links

          Activity

            People

              zhangyaqian Yaqian Zhang
              shaofengshi Shao Feng Shi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: