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

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: NRT Streaming
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: