Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-836

StringGroupFromDoubleTreeReader Use Double toString

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.0
    • 1.8.0
    • None
    • None

    Description

      https://github.com/apache/orc/blob/fb0ed31f15d9b77b76bc5dec8721f5d9ee129879/java/core/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java#L1104-L1106

            if (!Double.isNaN(doubleValue)) {
              String string = String.valueOf(doubleValue);
              byte[] bytes = string.getBytes(StandardCharsets.UTF_8);
              assignStringGroupVectorEntry(bytesColVector, elementNum, readerType, bytes);
            }
      

      String.valueOf simply calls Double.toString(), so just skip the jumps and call Double.toString() directly.

      Also, does not need to be UTF_8. Will only ever be ASCI values.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: