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

Use `FastDateFormat` as the legacy fractional formatter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.0.0
    • SQL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: