Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-31874

Use `FastDateFormat` as the legacy fractional formatter

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      By default HiveResult.hiveResultString retrieves timestamps values as instances of java.sql.Timestamp, and uses the legacy parser SimpleDateFormat to convert the timestamps to strings. After the fix #28024, the fractional formatter and its companion - legacy formatter SimpleDateFormat are created per every value. By switching from LegacySimpleTimestampFormatter to LegacyFastTimestampFormatter, we can utilize the internal cache of FastDateFormat, and avoid parsing the default pattern yyyy-MM-dd HH:mm:ss.

        Attachments

          Activity

            People

            • Assignee:
              maxgekk Max Gekk
              Reporter:
              maxgekk Max Gekk
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: