Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21252

LazyTimestamp - Use String Equals

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.0, 3.2.0
    • Fix Version/s: 4.0.0, 3.2.0
    • Labels:
      None
    • Flags:
      Patch

      Description

      LazyTimestamp.java
          if (s.compareTo("NULL") == 0) {
            isNull = true;
            logExceptionMessage(bytes, start, length, "TIMESTAMP");
          }
      

      compareTo generates a number to represent the differences between the two Strings. It's faster to simply call "equals" which will simply compare the two String directly and return a boolean.

        Attachments

        1. HIVE-21252.1.patch
          0.7 kB
          David Mollitor

          Activity

            People

            • Assignee:
              belugabehr David Mollitor
              Reporter:
              belugabehr David Mollitor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: