From e89f572c627a82d759d72fb8c1e5188aa30b14a9 Mon Sep 17 00:00:00 2001 From: Rito Takeuchi Date: Thu, 25 Jun 2026 17:29:22 +0900 Subject: [PATCH 1/4] [SPARK-57737][SQL] Cache zone offset per task in date_trunc --- .../expressions/datetimeExpressions.scala | 6 +- .../sql/catalyst/util/DateTimeUtils.scala | 96 ++++++++++++++++--- 2 files changed, 87 insertions(+), 15 deletions(-) diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala index 667f79c372887..f5cc5d38b2746 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala @@ -2887,9 +2887,13 @@ case class TruncTimestamp( override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = { val zid = ctx.addReferenceObj("zoneId", zoneId, classOf[ZoneId].getName) + // Per-task offset cache so the hot path avoids a transition-array binary search per row. + val cacheClass = classOf[org.apache.spark.sql.catalyst.util.ZoneOffsetCache].getName + val cache = ctx.addMutableState(cacheClass, "zoneOffsetCache", + v => s"$v = new $cacheClass($zid);", forceInline = true) codeGenHelper(ctx, ev, minLevel = MIN_LEVEL_OF_TIMESTAMP_TRUNC, true) { (date: String, fmt: String) => - s"truncTimestamp($date, $fmt, $zid);" + s"truncTimestamp($date, $fmt, $cache);" } } diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala index 481f997098584..64757fbfe3ed7 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala @@ -512,15 +512,29 @@ object DateTimeUtils extends SparkDateTimeUtils { instantToMicros(truncated.toInstant) } + /** + * Truncates the timestamp `micros` to `level` in `zoneId`. `level` should be generated using + * `parseTruncLevel()`, between 0 and 9. + * + * Convenience variant that resolves the zone offset from a fresh single-use [[ZoneOffsetCache]]; + * intended for one-shot callers such as interpreted evaluation and constant folding. The codegen + * hot path instead calls the [[ZoneOffsetCache]]-based overload directly with a per-task cache so + * the offset is reused across rows. The result is identical to that overload. + */ + def truncTimestamp(micros: Long, level: Int, zoneId: ZoneId): Long = + truncTimestamp(micros, level, new ZoneOffsetCache(zoneId)) + /** * Returns the trunc date time from original date time and trunc level. * Trunc level should be generated using `parseTruncLevel()`, should be between 0 and 9. * - * Uses an offset-arithmetic fast path: the zone offset at `micros` is resolved once, - * truncation runs in the shifted-local frame, and the result is shifted back to UTC - * micros. Falls back to [[truncTimestampSlow]] when the offset at the candidate - * truncated instant differs from the offset at `micros` (DST/historical transition - * spans the candidate; SPARK-30766/30857) or on arithmetic overflow. + * Uses an offset-arithmetic fast path: the zone offset at `micros` is resolved once through + * `cache`, which memoizes it over the constant-offset interval around the last lookup, so for + * temporally clustered data the per-row transition-array binary search collapses to two + * comparisons. Truncation then runs in the shifted-local frame, and the result is shifted back + * to UTC micros. Falls back to [[truncTimestampSlow]] when the offset at the candidate truncated + * instant differs from the offset at `micros` (DST/historical transition spans the candidate; + * SPARK-30766/30857) or on arithmetic overflow. * * Sub-minute LMT offsets (e.g. America/Los_Angeles -07:52:58 pre-1883, see * SPARK-33404) and 30/45-minute offsets (Asia/Kolkata +05:30, Asia/Kathmandu +05:45) @@ -538,7 +552,7 @@ object DateTimeUtils extends SparkDateTimeUtils { * - WEEK/MONTH/QUARTER/YEAR: convert local micros to local epoch-day, run * [[truncDate]] in the local-day frame, multiply back to local micros. */ - def truncTimestamp(micros: Long, level: Int, zoneId: ZoneId): Long = { + def truncTimestamp(micros: Long, level: Int, cache: ZoneOffsetCache): Long = { // MICROSECOND / MILLISECOND / SECOND don't need zone information. level match { case TRUNC_TO_MICROSECOND => return micros @@ -548,10 +562,8 @@ object DateTimeUtils extends SparkDateTimeUtils { return Math.subtractExact(micros, Math.floorMod(micros, MICROS_PER_SECOND)) case _ => } - val rules = zoneId.getRules val originalSec = Math.floorDiv(micros, MICROS_PER_SECOND) - val originalOffsetSec = - rules.getOffset(Instant.ofEpochSecond(originalSec)).getTotalSeconds.toLong + val originalOffsetSec = cache.offsetSeconds(originalSec) val offsetMicros = originalOffsetSec * MICROS_PER_SECOND try { val local = Math.addExact(micros, offsetMicros) @@ -567,17 +579,16 @@ object DateTimeUtils extends SparkDateTimeUtils { Math.multiplyExact(truncDate(localDays, level).toLong, MICROS_PER_DAY) } val candidate = Math.subtractExact(truncatedLocal, offsetMicros) - if (!rules.isFixedOffset) { + if (!cache.isFixedOffset) { val candidateSec = Math.floorDiv(candidate, MICROS_PER_SECOND) - val candidateOffsetSec = - rules.getOffset(Instant.ofEpochSecond(candidateSec)).getTotalSeconds.toLong + val candidateOffsetSec = cache.offsetSeconds(candidateSec) if (candidateOffsetSec != originalOffsetSec) { - return truncTimestampSlow(micros, level, zoneId) + return truncTimestampSlow(micros, level, cache.zoneId) } } candidate } catch { - case _: ArithmeticException => truncTimestampSlow(micros, level, zoneId) + case _: ArithmeticException => truncTimestampSlow(micros, level, cache.zoneId) } } @@ -1287,3 +1298,60 @@ object DateTimeUtils extends SparkDateTimeUtils { c } } + +/** + * Per-task memoization of a zone's UTC offset, used by the [[DateTimeUtils.truncTimestamp]] hot + * path. The session zone is constant for a query and the offset is piecewise-constant between DST + * transitions, so consecutive rows almost always resolve to the same offset. The cache holds the + * half-open epoch-second interval `[lo, hi)` on which the offset is provably constant -- derived + * from the surrounding zone transitions -- so a lookup that falls in the interval reduces to two + * comparisons instead of a transition-array binary search. + * + * Not thread-safe by design: a fresh instance is created per task (codegen mutable state) and used + * single-threaded, mirroring how stateful per-row helpers are scoped in generated code. + */ +class ZoneOffsetCache(val zoneId: ZoneId) { + private val rules = zoneId.getRules + val isFixedOffset: Boolean = rules.isFixedOffset + + private var cached = false + private var lo = 0L + private var hi = 0L + private var offsetSec = 0L + + /** + * Offset in seconds at `epochSec`, equal to + * `rules.getOffset(Instant.ofEpochSecond(epochSec)).getTotalSeconds`, memoized over the + * constant-offset interval containing the previous lookup. + */ + def offsetSeconds(epochSec: Long): Long = { + if (cached && epochSec >= lo && epochSec < hi) { + offsetSec + } else { + val instant = Instant.ofEpochSecond(epochSec) + val o = rules.getOffset(instant).getTotalSeconds.toLong + if (isFixedOffset) { + lo = Long.MinValue + hi = Long.MaxValue + } else { + val nextT = rules.nextTransition(instant) + if (nextT == null) { + // No transition after `instant`: offset is constant on [epochSec, +inf). + lo = epochSec + hi = Long.MaxValue + } else { + hi = nextT.toEpochSecond + // `hi - 1` lies strictly inside the constant-offset window ending at `hi` (zone + // transitions are always more than a second apart), so its previous transition is + // exactly that window's start. Anchoring on an interior point avoids an off-by-one + // when `epochSec` sits exactly on a transition instant. + val prevT = rules.previousTransition(Instant.ofEpochSecond(hi - 1)) + lo = if (prevT == null) Long.MinValue else prevT.toEpochSecond + } + } + offsetSec = o + cached = true + o + } + } +} From 79cd53635cdcba288035839e32fb3956a3c48c82 Mon Sep 17 00:00:00 2001 From: Licht-T Date: Sun, 28 Jun 2026 15:51:19 +0000 Subject: [PATCH 2/4] Benchmark results for org.apache.spark.sql.execution.benchmark.DateTimeBenchmark (JDK 21, Scala 2.13, split 1 of 1) --- .../DateTimeBenchmark-jdk21-results.txt | 372 +++++++++--------- 1 file changed, 186 insertions(+), 186 deletions(-) diff --git a/sql/core/benchmarks/DateTimeBenchmark-jdk21-results.txt b/sql/core/benchmarks/DateTimeBenchmark-jdk21-results.txt index c786a8a6d9063..a44b285e22afa 100644 --- a/sql/core/benchmarks/DateTimeBenchmark-jdk21-results.txt +++ b/sql/core/benchmarks/DateTimeBenchmark-jdk21-results.txt @@ -3,21 +3,21 @@ datetime +/- interval ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor datetime +/- interval: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date + interval(m) 737 781 66 13.6 73.7 1.0X -date + interval(m, d) 738 742 6 13.6 73.8 1.0X -date + interval(m, d, ms) 2887 2902 21 3.5 288.7 0.3X -date - interval(m) 709 716 7 14.1 70.9 1.0X -date - interval(m, d) 713 719 5 14.0 71.3 1.0X -date - interval(m, d, ms) 2908 2914 8 3.4 290.8 0.3X -timestamp + interval(m) 1457 1458 2 6.9 145.7 0.5X -timestamp + interval(m, d) 1476 1476 0 6.8 147.6 0.5X -timestamp + interval(m, d, ms) 1562 1564 3 6.4 156.2 0.5X -timestamp - interval(m) 1397 1401 5 7.2 139.7 0.5X -timestamp - interval(m, d) 1442 1446 5 6.9 144.2 0.5X -timestamp - interval(m, d, ms) 1564 1566 3 6.4 156.4 0.5X +date + interval(m) 829 906 86 12.1 82.9 1.0X +date + interval(m, d) 864 877 12 11.6 86.4 1.0X +date + interval(m, d, ms) 3716 3720 6 2.7 371.6 0.2X +date - interval(m) 841 847 8 11.9 84.1 1.0X +date - interval(m, d) 917 918 1 10.9 91.7 0.9X +date - interval(m, d, ms) 3770 3774 6 2.7 377.0 0.2X +timestamp + interval(m) 1533 1533 1 6.5 153.3 0.5X +timestamp + interval(m, d) 1581 1583 3 6.3 158.1 0.5X +timestamp + interval(m, d, ms) 2025 2027 2 4.9 202.5 0.4X +timestamp - interval(m) 1812 1818 9 5.5 181.2 0.5X +timestamp - interval(m, d) 1866 1870 6 5.4 186.6 0.4X +timestamp - interval(m, d, ms) 2021 2022 2 4.9 202.1 0.4X ================================================================================================ @@ -25,95 +25,95 @@ Extract components ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast to timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast to timestamp wholestage off 169 169 1 59.3 16.9 1.0X -cast to timestamp wholestage on 176 178 2 56.9 17.6 1.0X +cast to timestamp wholestage off 202 204 2 49.4 20.2 1.0X +cast to timestamp wholestage on 216 221 5 46.3 21.6 0.9X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor year of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -year of timestamp wholestage off 525 538 18 19.0 52.5 1.0X -year of timestamp wholestage on 533 539 7 18.8 53.3 1.0X +year of timestamp wholestage off 637 638 1 15.7 63.7 1.0X +year of timestamp wholestage on 639 646 6 15.6 63.9 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor quarter of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -quarter of timestamp wholestage off 556 558 2 18.0 55.6 1.0X -quarter of timestamp wholestage on 565 567 2 17.7 56.5 1.0X +quarter of timestamp wholestage off 672 675 4 14.9 67.2 1.0X +quarter of timestamp wholestage on 676 679 2 14.8 67.6 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor month of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -month of timestamp wholestage off 543 547 6 18.4 54.3 1.0X -month of timestamp wholestage on 550 551 1 18.2 55.0 1.0X +month of timestamp wholestage off 657 660 4 15.2 65.7 1.0X +month of timestamp wholestage on 654 657 3 15.3 65.4 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor weekofyear of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -weekofyear of timestamp wholestage off 775 782 9 12.9 77.5 1.0X -weekofyear of timestamp wholestage on 854 856 2 11.7 85.4 0.9X +weekofyear of timestamp wholestage off 938 938 1 10.7 93.8 1.0X +weekofyear of timestamp wholestage on 1073 1078 4 9.3 107.3 0.9X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor day of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -day of timestamp wholestage off 551 552 2 18.1 55.1 1.0X -day of timestamp wholestage on 553 562 15 18.1 55.3 1.0X +day of timestamp wholestage off 658 666 12 15.2 65.8 1.0X +day of timestamp wholestage on 659 663 5 15.2 65.9 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofyear of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofyear of timestamp wholestage off 568 570 3 17.6 56.8 1.0X -dayofyear of timestamp wholestage on 581 584 2 17.2 58.1 1.0X +dayofyear of timestamp wholestage off 701 702 1 14.3 70.1 1.0X +dayofyear of timestamp wholestage on 697 701 2 14.3 69.7 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofmonth of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofmonth of timestamp wholestage off 563 597 48 17.8 56.3 1.0X -dayofmonth of timestamp wholestage on 555 562 11 18.0 55.5 1.0X +dayofmonth of timestamp wholestage off 681 692 17 14.7 68.1 1.0X +dayofmonth of timestamp wholestage on 656 658 2 15.2 65.6 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofweek of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofweek of timestamp wholestage off 674 675 1 14.8 67.4 1.0X -dayofweek of timestamp wholestage on 677 684 6 14.8 67.7 1.0X +dayofweek of timestamp wholestage off 825 830 7 12.1 82.5 1.0X +dayofweek of timestamp wholestage on 837 840 4 11.9 83.7 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor weekday of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -weekday of timestamp wholestage off 628 629 1 15.9 62.8 1.0X -weekday of timestamp wholestage on 637 643 11 15.7 63.7 1.0X +weekday of timestamp wholestage off 760 763 4 13.2 76.0 1.0X +weekday of timestamp wholestage on 769 773 4 13.0 76.9 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor hour of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -hour of timestamp wholestage off 509 509 0 19.7 50.9 1.0X -hour of timestamp wholestage on 514 519 8 19.5 51.4 1.0X +hour of timestamp wholestage off 542 544 2 18.4 54.2 1.0X +hour of timestamp wholestage on 560 564 3 17.8 56.0 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor minute of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -minute of timestamp wholestage off 516 517 1 19.4 51.6 1.0X -minute of timestamp wholestage on 514 517 4 19.5 51.4 1.0X +minute of timestamp wholestage off 541 542 1 18.5 54.1 1.0X +minute of timestamp wholestage on 556 559 2 18.0 55.6 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor second of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -second of timestamp wholestage off 511 512 1 19.6 51.1 1.0X -second of timestamp wholestage on 516 521 3 19.4 51.6 1.0X +second of timestamp wholestage off 543 548 7 18.4 54.3 1.0X +second of timestamp wholestage on 561 564 2 17.8 56.1 1.0X ================================================================================================ @@ -121,18 +121,18 @@ Current date and time ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor current_date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -current_date wholestage off 150 150 0 66.6 15.0 1.0X -current_date wholestage on 177 181 4 56.4 17.7 0.8X +current_date wholestage off 178 181 4 56.0 17.8 1.0X +current_date wholestage on 217 221 4 46.1 21.7 0.8X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor current_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -current_timestamp wholestage off 165 175 15 60.7 16.5 1.0X -current_timestamp wholestage on 184 192 10 54.4 18.4 0.9X +current_timestamp wholestage off 193 203 14 51.7 19.3 1.0X +current_timestamp wholestage on 231 239 10 43.4 23.1 0.8X ================================================================================================ @@ -140,46 +140,46 @@ Date arithmetic ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast to date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast to date wholestage off 503 504 1 19.9 50.3 1.0X -cast to date wholestage on 508 515 12 19.7 50.8 1.0X +cast to date wholestage off 605 605 1 16.5 60.5 1.0X +cast to date wholestage on 630 636 8 15.9 63.0 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor last_day: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -last_day wholestage off 566 568 3 17.7 56.6 1.0X -last_day wholestage on 591 593 2 16.9 59.1 1.0X +last_day wholestage off 683 683 0 14.6 68.3 1.0X +last_day wholestage on 683 686 2 14.6 68.3 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor next_day: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -next_day wholestage off 541 552 16 18.5 54.1 1.0X -next_day wholestage on 544 546 3 18.4 54.4 1.0X +next_day wholestage off 646 650 5 15.5 64.6 1.0X +next_day wholestage on 659 665 5 15.2 65.9 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_add: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_add wholestage off 494 499 8 20.2 49.4 1.0X -date_add wholestage on 510 517 10 19.6 51.0 1.0X +date_add wholestage off 583 584 2 17.2 58.3 1.0X +date_add wholestage on 590 594 4 17.0 59.0 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_sub: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_sub wholestage off 495 499 6 20.2 49.5 1.0X -date_sub wholestage on 509 514 6 19.7 50.9 1.0X +date_sub wholestage off 587 588 1 17.0 58.7 1.0X +date_sub wholestage on 589 592 4 17.0 58.9 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor add_months: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -add_months wholestage off 692 692 0 14.5 69.2 1.0X -add_months wholestage on 696 706 15 14.4 69.6 1.0X +add_months wholestage off 833 834 1 12.0 83.3 1.0X +add_months wholestage on 831 836 6 12.0 83.1 1.0X ================================================================================================ @@ -187,11 +187,11 @@ Formatting dates ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor format date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -format date wholestage off 2342 2346 6 4.3 234.2 1.0X -format date wholestage on 2349 2357 12 4.3 234.9 1.0X +format date wholestage off 2812 2815 5 3.6 281.2 1.0X +format date wholestage on 2788 2830 24 3.6 278.8 1.0X ================================================================================================ @@ -199,11 +199,11 @@ Formatting timestamps ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor from_unixtime: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -from_unixtime wholestage off 2054 2055 1 4.9 205.4 1.0X -from_unixtime wholestage on 2089 2096 9 4.8 208.9 1.0X +from_unixtime wholestage off 2588 2591 5 3.9 258.8 1.0X +from_unixtime wholestage on 2683 2691 6 3.7 268.3 1.0X ================================================================================================ @@ -211,18 +211,18 @@ Convert timestamps ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor from_utc_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -from_utc_timestamp wholestage off 616 619 4 16.2 61.6 1.0X -from_utc_timestamp wholestage on 662 664 3 15.1 66.2 0.9X +from_utc_timestamp wholestage off 657 666 13 15.2 65.7 1.0X +from_utc_timestamp wholestage on 782 786 6 12.8 78.2 0.8X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_utc_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_utc_timestamp wholestage off 667 670 5 15.0 66.7 1.0X -to_utc_timestamp wholestage on 681 687 5 14.7 68.1 1.0X +to_utc_timestamp wholestage off 794 794 0 12.6 79.4 1.0X +to_utc_timestamp wholestage on 846 852 7 11.8 84.6 0.9X ================================================================================================ @@ -230,32 +230,32 @@ Intervals ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast interval: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast interval wholestage off 181 182 0 55.1 18.1 1.0X -cast interval wholestage on 179 184 3 55.8 17.9 1.0X +cast interval wholestage off 242 262 27 41.3 24.2 1.0X +cast interval wholestage on 223 226 3 44.9 22.3 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor datediff: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -datediff wholestage off 827 846 27 12.1 82.7 1.0X -datediff wholestage on 825 833 14 12.1 82.5 1.0X +datediff wholestage off 996 997 1 10.0 99.6 1.0X +datediff wholestage on 1046 1049 4 9.6 104.6 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor months_between: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -months_between wholestage off 2538 2540 2 3.9 253.8 1.0X -months_between wholestage on 2590 2607 17 3.9 259.0 1.0X +months_between wholestage off 2890 2891 1 3.5 289.0 1.0X +months_between wholestage on 2889 2894 5 3.5 288.9 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor window: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -window wholestage off 457 477 28 2.2 457.5 1.0X -window wholestage on 494 502 10 2.0 494.3 0.9X +window wholestage off 621 628 10 1.6 620.8 1.0X +window wholestage on 660 680 18 1.5 660.2 0.9X ================================================================================================ @@ -263,137 +263,137 @@ Truncation ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YEAR: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YEAR wholestage off 628 630 3 15.9 62.8 1.0X -date_trunc YEAR wholestage on 632 643 14 15.8 63.2 1.0X +date_trunc YEAR wholestage off 503 529 36 19.9 50.3 1.0X +date_trunc YEAR wholestage on 446 450 3 22.4 44.6 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YYYY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YYYY wholestage off 626 632 9 16.0 62.6 1.0X -date_trunc YYYY wholestage on 632 635 3 15.8 63.2 1.0X +date_trunc YYYY wholestage off 503 504 1 19.9 50.3 1.0X +date_trunc YYYY wholestage on 446 452 5 22.4 44.6 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YY wholestage off 628 629 2 15.9 62.8 1.0X -date_trunc YY wholestage on 631 632 1 15.8 63.1 1.0X +date_trunc YY wholestage off 502 511 13 19.9 50.2 1.0X +date_trunc YY wholestage on 447 451 7 22.4 44.7 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MON: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MON wholestage off 634 635 2 15.8 63.4 1.0X -date_trunc MON wholestage on 616 619 3 16.2 61.6 1.0X +date_trunc MON wholestage off 463 463 0 21.6 46.3 1.0X +date_trunc MON wholestage on 417 421 2 24.0 41.7 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MONTH: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MONTH wholestage off 635 636 1 15.8 63.5 1.0X -date_trunc MONTH wholestage on 616 640 34 16.2 61.6 1.0X +date_trunc MONTH wholestage off 461 461 0 21.7 46.1 1.0X +date_trunc MONTH wholestage on 417 421 2 24.0 41.7 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MM: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MM wholestage off 638 639 2 15.7 63.8 1.0X -date_trunc MM wholestage on 615 621 6 16.3 61.5 1.0X +date_trunc MM wholestage off 464 465 1 21.5 46.4 1.0X +date_trunc MM wholestage on 421 425 4 23.8 42.1 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc DAY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc DAY wholestage off 503 503 0 19.9 50.3 1.0X -date_trunc DAY wholestage on 487 492 7 20.5 48.7 1.0X +date_trunc DAY wholestage off 343 347 6 29.2 34.3 1.0X +date_trunc DAY wholestage on 327 331 5 30.6 32.7 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc DD: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc DD wholestage off 500 502 3 20.0 50.0 1.0X -date_trunc DD wholestage on 485 487 2 20.6 48.5 1.0X +date_trunc DD wholestage off 341 342 1 29.3 34.1 1.0X +date_trunc DD wholestage on 324 328 2 30.8 32.4 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc HOUR: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc HOUR wholestage off 527 528 1 19.0 52.7 1.0X -date_trunc HOUR wholestage on 501 503 2 19.9 50.1 1.1X +date_trunc HOUR wholestage off 337 337 0 29.7 33.7 1.0X +date_trunc HOUR wholestage on 318 319 2 31.5 31.8 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MINUTE: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MINUTE wholestage off 505 518 19 19.8 50.5 1.0X -date_trunc MINUTE wholestage on 481 483 3 20.8 48.1 1.0X +date_trunc MINUTE wholestage off 350 350 0 28.6 35.0 1.0X +date_trunc MINUTE wholestage on 316 320 6 31.6 31.6 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc SECOND: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc SECOND wholestage off 258 259 1 38.8 25.8 1.0X -date_trunc SECOND wholestage on 221 223 2 45.2 22.1 1.2X +date_trunc SECOND wholestage off 339 340 1 29.5 33.9 1.0X +date_trunc SECOND wholestage on 297 299 1 33.7 29.7 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc WEEK: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc WEEK wholestage off 534 536 3 18.7 53.4 1.0X -date_trunc WEEK wholestage on 512 514 2 19.5 51.2 1.0X +date_trunc WEEK wholestage off 413 414 1 24.2 41.3 1.0X +date_trunc WEEK wholestage on 372 375 3 26.9 37.2 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc QUARTER: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc QUARTER wholestage off 714 716 3 14.0 71.4 1.0X -date_trunc QUARTER wholestage on 693 696 3 14.4 69.3 1.0X +date_trunc QUARTER wholestage off 657 659 2 15.2 65.7 1.0X +date_trunc QUARTER wholestage on 613 614 2 16.3 61.3 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc year: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc year wholestage off 666 673 9 15.0 66.6 1.0X -trunc year wholestage on 632 633 1 15.8 63.2 1.1X +trunc year wholestage off 847 847 1 11.8 84.7 1.0X +trunc year wholestage on 792 796 3 12.6 79.2 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc yyyy: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc yyyy wholestage off 669 669 1 15.0 66.9 1.0X -trunc yyyy wholestage on 633 637 4 15.8 63.3 1.1X +trunc yyyy wholestage off 842 843 1 11.9 84.2 1.0X +trunc yyyy wholestage on 796 798 2 12.6 79.6 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc yy: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc yy wholestage off 673 679 7 14.9 67.3 1.0X -trunc yy wholestage on 636 642 12 15.7 63.6 1.1X +trunc yy wholestage off 844 847 5 11.9 84.4 1.0X +trunc yy wholestage on 793 797 4 12.6 79.3 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc mon: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc mon wholestage off 633 633 1 15.8 63.3 1.0X -trunc mon wholestage on 599 603 3 16.7 59.9 1.1X +trunc mon wholestage off 828 829 1 12.1 82.8 1.0X +trunc mon wholestage on 768 769 1 13.0 76.8 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc month: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc month wholestage off 626 627 1 16.0 62.6 1.0X -trunc month wholestage on 601 610 18 16.7 60.1 1.0X +trunc month wholestage off 829 829 0 12.1 82.9 1.0X +trunc month wholestage on 768 775 8 13.0 76.8 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc mm: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc mm wholestage off 627 632 7 15.9 62.7 1.0X -trunc mm wholestage on 599 602 3 16.7 59.9 1.0X +trunc mm wholestage off 825 826 1 12.1 82.5 1.0X +trunc mm wholestage on 769 770 1 13.0 76.9 1.1X ================================================================================================ @@ -401,39 +401,39 @@ Parsing ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to timestamp str: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to timestamp str wholestage off 77 80 4 12.9 77.3 1.0X -to timestamp str wholestage on 79 81 3 12.7 78.9 1.0X +to timestamp str wholestage off 108 110 3 9.3 107.6 1.0X +to timestamp str wholestage on 102 105 3 9.8 102.0 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_timestamp wholestage off 457 458 0 2.2 457.4 1.0X -to_timestamp wholestage on 455 456 1 2.2 454.9 1.0X +to_timestamp wholestage off 680 680 1 1.5 679.5 1.0X +to_timestamp wholestage on 687 691 4 1.5 686.6 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_unix_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_unix_timestamp wholestage off 459 460 1 2.2 459.4 1.0X -to_unix_timestamp wholestage on 445 446 1 2.2 444.9 1.0X +to_unix_timestamp wholestage off 691 691 1 1.4 690.8 1.0X +to_unix_timestamp wholestage on 673 679 7 1.5 673.0 1.0X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to date str: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to date str wholestage off 108 108 0 9.3 107.5 1.0X -to date str wholestage on 102 104 2 9.8 102.0 1.1X +to date str wholestage off 153 155 3 6.5 152.8 1.0X +to date str wholestage on 133 137 6 7.5 133.3 1.1X OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_date wholestage off 472 473 1 2.1 472.0 1.0X -to_date wholestage on 455 465 20 2.2 454.9 1.0X +to_date wholestage off 632 638 9 1.6 631.7 1.0X +to_date wholestage on 638 641 2 1.6 638.3 1.0X ================================================================================================ @@ -441,21 +441,21 @@ Conversion from/to external types ================================================================================================ OpenJDK 64-Bit Server VM 21.0.11+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor To/from Java's date-time: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -From java.sql.Date 246 249 4 20.3 49.2 1.0X -From java.time.LocalDate 170 172 2 29.4 34.0 1.4X -Collect java.sql.Date 1034 1087 61 4.8 206.9 0.2X -Collect java.time.LocalDate 701 803 158 7.1 140.1 0.4X -From java.sql.Timestamp 173 203 32 29.0 34.5 1.4X -From java.time.Instant 133 135 3 37.5 26.6 1.8X -Collect longs 749 785 61 6.7 149.9 0.3X -Collect java.sql.Timestamp 869 925 84 5.8 173.7 0.3X -Collect java.time.Instant 734 860 125 6.8 146.8 0.3X -java.sql.Date to Hive string 3281 3391 127 1.5 656.2 0.1X -java.time.LocalDate to Hive string 2410 2458 52 2.1 481.9 0.1X -java.sql.Timestamp to Hive string 5030 5142 156 1.0 1006.1 0.0X -java.time.Instant to Hive string 3179 3225 48 1.6 635.8 0.1X +From java.sql.Date 290 292 2 17.2 58.1 1.0X +From java.time.LocalDate 229 230 1 21.8 45.9 1.3X +Collect java.sql.Date 1179 1265 76 4.2 235.9 0.2X +Collect java.time.LocalDate 927 1056 117 5.4 185.5 0.3X +From java.sql.Timestamp 230 256 22 21.8 46.0 1.3X +From java.time.Instant 187 190 4 26.8 37.3 1.6X +Collect longs 903 1039 132 5.5 180.5 0.3X +Collect java.sql.Timestamp 1068 1150 89 4.7 213.5 0.3X +Collect java.time.Instant 963 1083 132 5.2 192.5 0.3X +java.sql.Date to Hive string 4107 4124 16 1.2 821.4 0.1X +java.time.LocalDate to Hive string 3029 3126 103 1.7 605.7 0.1X +java.sql.Timestamp to Hive string 6537 6586 58 0.8 1307.3 0.0X +java.time.Instant to Hive string 4089 4127 47 1.2 817.7 0.1X From 326285cff3da78850b498ff8017da46d59086491 Mon Sep 17 00:00:00 2001 From: Licht-T Date: Sun, 28 Jun 2026 15:51:39 +0000 Subject: [PATCH 3/4] Benchmark results for org.apache.spark.sql.execution.benchmark.DateTimeBenchmark (JDK 25, Scala 2.13, split 1 of 1) --- .../DateTimeBenchmark-jdk25-results.txt | 372 +++++++++--------- 1 file changed, 186 insertions(+), 186 deletions(-) diff --git a/sql/core/benchmarks/DateTimeBenchmark-jdk25-results.txt b/sql/core/benchmarks/DateTimeBenchmark-jdk25-results.txt index d80ce955be210..967acf12448d3 100644 --- a/sql/core/benchmarks/DateTimeBenchmark-jdk25-results.txt +++ b/sql/core/benchmarks/DateTimeBenchmark-jdk25-results.txt @@ -3,21 +3,21 @@ datetime +/- interval ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor datetime +/- interval: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date + interval(m) 915 954 67 10.9 91.5 1.0X -date + interval(m, d) 903 916 13 11.1 90.3 1.0X -date + interval(m, d, ms) 3520 3548 40 2.8 352.0 0.3X -date - interval(m) 893 896 4 11.2 89.3 1.0X -date - interval(m, d) 900 901 1 11.1 90.0 1.0X -date - interval(m, d, ms) 3547 3556 13 2.8 354.7 0.3X -timestamp + interval(m) 1909 1910 1 5.2 190.9 0.5X -timestamp + interval(m, d) 1946 1948 3 5.1 194.6 0.5X -timestamp + interval(m, d, ms) 2071 2075 6 4.8 207.1 0.4X -timestamp - interval(m) 1844 1845 2 5.4 184.4 0.5X -timestamp - interval(m, d) 1922 1927 6 5.2 192.2 0.5X -timestamp - interval(m, d, ms) 2070 2071 2 4.8 207.0 0.4X +date + interval(m) 827 873 65 12.1 82.7 1.0X +date + interval(m, d) 816 824 9 12.2 81.6 1.0X +date + interval(m, d, ms) 3394 3396 3 2.9 339.4 0.2X +date - interval(m) 795 801 5 12.6 79.5 1.0X +date - interval(m, d) 818 820 2 12.2 81.8 1.0X +date - interval(m, d, ms) 3347 3350 5 3.0 334.7 0.2X +timestamp + interval(m) 1693 1695 3 5.9 169.3 0.5X +timestamp + interval(m, d) 1736 1738 3 5.8 173.6 0.5X +timestamp + interval(m, d, ms) 2065 2067 3 4.8 206.5 0.4X +timestamp - interval(m) 1818 1821 5 5.5 181.8 0.5X +timestamp - interval(m, d) 1876 1877 2 5.3 187.6 0.4X +timestamp - interval(m, d, ms) 2081 2084 4 4.8 208.1 0.4X ================================================================================================ @@ -25,95 +25,95 @@ Extract components ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast to timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast to timestamp wholestage off 213 215 2 46.9 21.3 1.0X -cast to timestamp wholestage on 220 225 3 45.5 22.0 1.0X +cast to timestamp wholestage off 210 210 0 47.7 21.0 1.0X +cast to timestamp wholestage on 215 218 3 46.5 21.5 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor year of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -year of timestamp wholestage off 667 673 8 15.0 66.7 1.0X -year of timestamp wholestage on 686 689 4 14.6 68.6 1.0X +year of timestamp wholestage off 612 614 2 16.3 61.2 1.0X +year of timestamp wholestage on 606 616 9 16.5 60.6 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor quarter of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -quarter of timestamp wholestage off 712 714 4 14.1 71.2 1.0X -quarter of timestamp wholestage on 721 724 4 13.9 72.1 1.0X +quarter of timestamp wholestage off 651 653 4 15.4 65.1 1.0X +quarter of timestamp wholestage on 635 641 6 15.8 63.5 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor month of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -month of timestamp wholestage off 690 692 3 14.5 69.0 1.0X -month of timestamp wholestage on 706 726 17 14.2 70.6 1.0X +month of timestamp wholestage off 646 660 20 15.5 64.6 1.0X +month of timestamp wholestage on 628 639 21 15.9 62.8 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor weekofyear of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -weekofyear of timestamp wholestage off 998 1005 10 10.0 99.8 1.0X -weekofyear of timestamp wholestage on 1036 1039 3 9.6 103.6 1.0X +weekofyear of timestamp wholestage off 910 911 1 11.0 91.0 1.0X +weekofyear of timestamp wholestage on 951 958 9 10.5 95.1 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor day of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -day of timestamp wholestage off 701 703 2 14.3 70.1 1.0X -day of timestamp wholestage on 715 722 5 14.0 71.5 1.0X +day of timestamp wholestage off 641 644 4 15.6 64.1 1.0X +day of timestamp wholestage on 629 631 1 15.9 62.9 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofyear of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofyear of timestamp wholestage off 742 748 9 13.5 74.2 1.0X -dayofyear of timestamp wholestage on 748 754 5 13.4 74.8 1.0X +dayofyear of timestamp wholestage off 673 675 4 14.9 67.3 1.0X +dayofyear of timestamp wholestage on 668 673 5 15.0 66.8 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofmonth of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofmonth of timestamp wholestage off 706 714 12 14.2 70.6 1.0X -dayofmonth of timestamp wholestage on 713 718 3 14.0 71.3 1.0X +dayofmonth of timestamp wholestage off 636 636 0 15.7 63.6 1.0X +dayofmonth of timestamp wholestage on 625 631 4 16.0 62.5 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofweek of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofweek of timestamp wholestage off 858 860 3 11.7 85.8 1.0X -dayofweek of timestamp wholestage on 864 868 6 11.6 86.4 1.0X +dayofweek of timestamp wholestage off 795 799 6 12.6 79.5 1.0X +dayofweek of timestamp wholestage on 787 790 2 12.7 78.7 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor weekday of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -weekday of timestamp wholestage off 818 830 17 12.2 81.8 1.0X -weekday of timestamp wholestage on 826 829 2 12.1 82.6 1.0X +weekday of timestamp wholestage off 733 734 1 13.6 73.3 1.0X +weekday of timestamp wholestage on 728 739 15 13.7 72.8 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor hour of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -hour of timestamp wholestage off 594 595 1 16.8 59.4 1.0X -hour of timestamp wholestage on 600 605 4 16.7 60.0 1.0X +hour of timestamp wholestage off 544 544 0 18.4 54.4 1.0X +hour of timestamp wholestage on 545 549 6 18.4 54.5 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor minute of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -minute of timestamp wholestage off 594 596 3 16.8 59.4 1.0X -minute of timestamp wholestage on 600 602 1 16.7 60.0 1.0X +minute of timestamp wholestage off 544 547 4 18.4 54.4 1.0X +minute of timestamp wholestage on 542 546 2 18.4 54.2 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor second of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -second of timestamp wholestage off 590 591 1 16.9 59.0 1.0X -second of timestamp wholestage on 601 604 3 16.6 60.1 1.0X +second of timestamp wholestage off 548 549 1 18.3 54.8 1.0X +second of timestamp wholestage on 561 565 7 17.8 56.1 1.0X ================================================================================================ @@ -121,18 +121,18 @@ Current date and time ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor current_date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -current_date wholestage off 212 215 3 47.1 21.2 1.0X -current_date wholestage on 216 222 6 46.2 21.6 1.0X +current_date wholestage off 192 192 0 52.1 19.2 1.0X +current_date wholestage on 206 208 1 48.5 20.6 0.9X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor current_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -current_timestamp wholestage off 218 223 7 45.9 21.8 1.0X -current_timestamp wholestage on 223 235 18 44.8 22.3 1.0X +current_timestamp wholestage off 196 199 4 51.0 19.6 1.0X +current_timestamp wholestage on 212 219 6 47.2 21.2 0.9X ================================================================================================ @@ -140,46 +140,46 @@ Date arithmetic ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast to date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast to date wholestage off 642 643 2 15.6 64.2 1.0X -cast to date wholestage on 643 647 5 15.5 64.3 1.0X +cast to date wholestage off 586 588 3 17.1 58.6 1.0X +cast to date wholestage on 578 580 2 17.3 57.8 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor last_day: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -last_day wholestage off 729 738 13 13.7 72.9 1.0X -last_day wholestage on 733 737 3 13.6 73.3 1.0X +last_day wholestage off 664 664 1 15.1 66.4 1.0X +last_day wholestage on 667 669 4 15.0 66.7 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor next_day: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -next_day wholestage off 676 677 1 14.8 67.6 1.0X -next_day wholestage on 683 687 4 14.6 68.3 1.0X +next_day wholestage off 613 621 12 16.3 61.3 1.0X +next_day wholestage on 612 618 4 16.3 61.2 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_add: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_add wholestage off 632 633 1 15.8 63.2 1.0X -date_add wholestage on 644 648 3 15.5 64.4 1.0X +date_add wholestage off 566 568 2 17.7 56.6 1.0X +date_add wholestage on 575 576 2 17.4 57.5 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_sub: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_sub wholestage off 627 628 1 15.9 62.7 1.0X -date_sub wholestage on 641 646 8 15.6 64.1 1.0X +date_sub wholestage off 569 572 3 17.6 56.9 1.0X +date_sub wholestage on 574 578 3 17.4 57.4 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor add_months: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -add_months wholestage off 892 893 1 11.2 89.2 1.0X -add_months wholestage on 915 916 1 10.9 91.5 1.0X +add_months wholestage off 806 807 2 12.4 80.6 1.0X +add_months wholestage on 812 823 12 12.3 81.2 1.0X ================================================================================================ @@ -187,11 +187,11 @@ Formatting dates ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor format date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -format date wholestage off 2791 2805 20 3.6 279.1 1.0X -format date wholestage on 2756 2760 6 3.6 275.6 1.0X +format date wholestage off 2844 2846 2 3.5 284.4 1.0X +format date wholestage on 2853 2879 45 3.5 285.3 1.0X ================================================================================================ @@ -199,11 +199,11 @@ Formatting timestamps ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor from_unixtime: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -from_unixtime wholestage off 2574 2578 5 3.9 257.4 1.0X -from_unixtime wholestage on 2595 2612 12 3.9 259.5 1.0X +from_unixtime wholestage off 2658 2658 1 3.8 265.8 1.0X +from_unixtime wholestage on 2549 2557 7 3.9 254.9 1.0X ================================================================================================ @@ -211,18 +211,18 @@ Convert timestamps ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor from_utc_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -from_utc_timestamp wholestage off 718 732 21 13.9 71.8 1.0X -from_utc_timestamp wholestage on 746 755 16 13.4 74.6 1.0X +from_utc_timestamp wholestage off 689 691 2 14.5 68.9 1.0X +from_utc_timestamp wholestage on 697 701 5 14.3 69.7 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_utc_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_utc_timestamp wholestage off 940 946 9 10.6 94.0 1.0X -to_utc_timestamp wholestage on 963 975 14 10.4 96.3 1.0X +to_utc_timestamp wholestage off 874 874 0 11.4 87.4 1.0X +to_utc_timestamp wholestage on 884 889 4 11.3 88.4 1.0X ================================================================================================ @@ -230,32 +230,32 @@ Intervals ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast interval: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast interval wholestage off 253 256 4 39.5 25.3 1.0X -cast interval wholestage on 218 220 2 45.8 21.8 1.2X +cast interval wholestage off 250 254 5 40.0 25.0 1.0X +cast interval wholestage on 217 223 5 46.0 21.7 1.2X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor datediff: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -datediff wholestage off 1054 1056 2 9.5 105.4 1.0X -datediff wholestage on 1044 1060 26 9.6 104.4 1.0X +datediff wholestage off 964 964 0 10.4 96.4 1.0X +datediff wholestage on 945 950 5 10.6 94.5 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor months_between: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -months_between wholestage off 2945 2948 4 3.4 294.5 1.0X -months_between wholestage on 2926 2935 11 3.4 292.6 1.0X +months_between wholestage off 2589 2594 6 3.9 258.9 1.0X +months_between wholestage on 2613 2617 2 3.8 261.3 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor window: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -window wholestage off 618 619 1 1.6 618.2 1.0X -window wholestage on 662 672 8 1.5 661.8 0.9X +window wholestage off 549 565 22 1.8 549.2 1.0X +window wholestage on 691 699 9 1.4 691.1 0.8X ================================================================================================ @@ -263,137 +263,137 @@ Truncation ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YEAR: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YEAR wholestage off 795 799 5 12.6 79.5 1.0X -date_trunc YEAR wholestage on 769 774 10 13.0 76.9 1.0X +date_trunc YEAR wholestage off 509 512 4 19.6 50.9 1.0X +date_trunc YEAR wholestage on 445 447 1 22.5 44.5 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YYYY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YYYY wholestage off 795 801 10 12.6 79.5 1.0X -date_trunc YYYY wholestage on 768 773 5 13.0 76.8 1.0X +date_trunc YYYY wholestage off 514 522 12 19.5 51.4 1.0X +date_trunc YYYY wholestage on 444 451 8 22.5 44.4 1.2X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YY wholestage off 792 798 8 12.6 79.2 1.0X -date_trunc YY wholestage on 769 770 0 13.0 76.9 1.0X +date_trunc YY wholestage off 506 507 0 19.8 50.6 1.0X +date_trunc YY wholestage on 446 447 1 22.4 44.6 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MON: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MON wholestage off 789 790 1 12.7 78.9 1.0X -date_trunc MON wholestage on 737 741 4 13.6 73.7 1.1X +date_trunc MON wholestage off 465 465 0 21.5 46.5 1.0X +date_trunc MON wholestage on 430 436 9 23.3 43.0 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MONTH: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MONTH wholestage off 791 794 5 12.6 79.1 1.0X -date_trunc MONTH wholestage on 735 737 1 13.6 73.5 1.1X +date_trunc MONTH wholestage off 466 466 1 21.5 46.6 1.0X +date_trunc MONTH wholestage on 429 433 2 23.3 42.9 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MM: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MM wholestage off 789 797 11 12.7 78.9 1.0X -date_trunc MM wholestage on 733 737 3 13.6 73.3 1.1X +date_trunc MM wholestage off 466 468 2 21.4 46.6 1.0X +date_trunc MM wholestage on 429 433 4 23.3 42.9 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc DAY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc DAY wholestage off 655 660 6 15.3 65.5 1.0X -date_trunc DAY wholestage on 620 623 5 16.1 62.0 1.1X +date_trunc DAY wholestage off 343 344 1 29.1 34.3 1.0X +date_trunc DAY wholestage on 333 337 3 30.0 33.3 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc DD: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc DD wholestage off 665 668 4 15.0 66.5 1.0X -date_trunc DD wholestage on 619 624 4 16.2 61.9 1.1X +date_trunc DD wholestage off 346 347 1 28.9 34.6 1.0X +date_trunc DD wholestage on 333 337 4 30.1 33.3 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc HOUR: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc HOUR wholestage off 649 654 8 15.4 64.9 1.0X -date_trunc HOUR wholestage on 614 616 2 16.3 61.4 1.1X +date_trunc HOUR wholestage off 357 357 0 28.0 35.7 1.0X +date_trunc HOUR wholestage on 325 339 23 30.8 32.5 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MINUTE: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MINUTE wholestage off 628 631 4 15.9 62.8 1.0X -date_trunc MINUTE wholestage on 590 591 1 17.0 59.0 1.1X +date_trunc MINUTE wholestage off 334 334 0 29.9 33.4 1.0X +date_trunc MINUTE wholestage on 322 327 5 31.0 32.2 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc SECOND: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc SECOND wholestage off 365 367 2 27.4 36.5 1.0X -date_trunc SECOND wholestage on 314 317 3 31.9 31.4 1.2X +date_trunc SECOND wholestage off 341 342 1 29.3 34.1 1.0X +date_trunc SECOND wholestage on 304 306 2 32.9 30.4 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc WEEK: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc WEEK wholestage off 720 720 0 13.9 72.0 1.0X -date_trunc WEEK wholestage on 664 668 4 15.1 66.4 1.1X +date_trunc WEEK wholestage off 415 417 2 24.1 41.5 1.0X +date_trunc WEEK wholestage on 383 388 11 26.1 38.3 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc QUARTER: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc QUARTER wholestage off 925 925 0 10.8 92.5 1.0X -date_trunc QUARTER wholestage on 880 882 2 11.4 88.0 1.1X +date_trunc QUARTER wholestage off 654 655 2 15.3 65.4 1.0X +date_trunc QUARTER wholestage on 623 629 9 16.1 62.3 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc year: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc year wholestage off 870 874 5 11.5 87.0 1.0X -trunc year wholestage on 826 831 4 12.1 82.6 1.1X +trunc year wholestage off 800 802 2 12.5 80.0 1.0X +trunc year wholestage on 772 773 1 13.0 77.2 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc yyyy: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc yyyy wholestage off 870 871 0 11.5 87.0 1.0X -trunc yyyy wholestage on 829 831 2 12.1 82.9 1.1X +trunc yyyy wholestage off 801 801 0 12.5 80.1 1.0X +trunc yyyy wholestage on 771 774 3 13.0 77.1 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc yy: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc yy wholestage off 870 873 4 11.5 87.0 1.0X -trunc yy wholestage on 826 838 23 12.1 82.6 1.1X +trunc yy wholestage off 800 801 1 12.5 80.0 1.0X +trunc yy wholestage on 771 777 7 13.0 77.1 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc mon: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc mon wholestage off 826 837 15 12.1 82.6 1.0X -trunc mon wholestage on 784 787 2 12.8 78.4 1.1X +trunc mon wholestage off 789 789 0 12.7 78.9 1.0X +trunc mon wholestage on 746 752 4 13.4 74.6 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc month: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc month wholestage off 826 832 8 12.1 82.6 1.0X -trunc month wholestage on 785 789 2 12.7 78.5 1.1X +trunc month wholestage off 786 788 3 12.7 78.6 1.0X +trunc month wholestage on 746 753 7 13.4 74.6 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc mm: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc mm wholestage off 823 825 3 12.1 82.3 1.0X -trunc mm wholestage on 783 788 4 12.8 78.3 1.1X +trunc mm wholestage off 788 796 12 12.7 78.8 1.0X +trunc mm wholestage on 746 755 10 13.4 74.6 1.1X ================================================================================================ @@ -401,39 +401,39 @@ Parsing ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to timestamp str: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to timestamp str wholestage off 93 96 5 10.8 92.6 1.0X -to timestamp str wholestage on 87 90 2 11.4 87.4 1.1X +to timestamp str wholestage off 92 93 2 10.9 91.8 1.0X +to timestamp str wholestage on 86 87 1 11.7 85.5 1.1X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_timestamp wholestage off 592 594 4 1.7 591.7 1.0X -to_timestamp wholestage on 569 574 4 1.8 569.2 1.0X +to_timestamp wholestage off 643 646 4 1.6 643.4 1.0X +to_timestamp wholestage on 643 645 2 1.6 643.2 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_unix_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_unix_timestamp wholestage off 573 576 5 1.7 572.9 1.0X -to_unix_timestamp wholestage on 571 575 3 1.8 570.6 1.0X +to_unix_timestamp wholestage off 629 629 0 1.6 628.8 1.0X +to_unix_timestamp wholestage on 653 654 1 1.5 653.2 1.0X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to date str: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to date str wholestage off 112 113 2 9.0 111.6 1.0X -to date str wholestage on 115 116 1 8.7 114.7 1.0X +to date str wholestage off 109 110 2 9.2 108.7 1.0X +to date str wholestage on 115 120 4 8.7 115.3 0.9X OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_date wholestage off 544 545 2 1.8 543.6 1.0X -to_date wholestage on 548 549 1 1.8 548.1 1.0X +to_date wholestage off 606 611 7 1.7 605.6 1.0X +to_date wholestage on 607 608 1 1.6 607.1 1.0X ================================================================================================ @@ -441,21 +441,21 @@ Conversion from/to external types ================================================================================================ OpenJDK 64-Bit Server VM 25.0.3+9-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor To/from Java's date-time: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -From java.sql.Date 320 325 6 15.6 64.1 1.0X -From java.time.LocalDate 243 251 11 20.6 48.5 1.3X -Collect java.sql.Date 1303 1415 110 3.8 260.7 0.2X -Collect java.time.LocalDate 944 1113 147 5.3 188.7 0.3X -From java.sql.Timestamp 276 278 3 18.1 55.2 1.2X -From java.time.Instant 209 229 18 23.9 41.8 1.5X -Collect longs 935 1058 107 5.4 186.9 0.3X -Collect java.sql.Timestamp 1294 1361 66 3.9 258.9 0.2X -Collect java.time.Instant 826 1140 295 6.1 165.1 0.4X -java.sql.Date to Hive string 3915 3966 45 1.3 782.9 0.1X -java.time.LocalDate to Hive string 3063 3290 198 1.6 612.5 0.1X -java.sql.Timestamp to Hive string 6790 6889 109 0.7 1358.1 0.0X -java.time.Instant to Hive string 4080 4120 41 1.2 816.1 0.1X +From java.sql.Date 308 315 11 16.2 61.7 1.0X +From java.time.LocalDate 234 235 1 21.4 46.8 1.3X +Collect java.sql.Date 1259 1343 100 4.0 251.9 0.2X +Collect java.time.LocalDate 1095 1174 115 4.6 218.9 0.3X +From java.sql.Timestamp 263 267 4 19.0 52.6 1.2X +From java.time.Instant 204 225 18 24.5 40.8 1.5X +Collect longs 921 995 89 5.4 184.1 0.3X +Collect java.sql.Timestamp 1165 1203 33 4.3 232.9 0.3X +Collect java.time.Instant 932 998 62 5.4 186.5 0.3X +java.sql.Date to Hive string 3919 3987 79 1.3 783.8 0.1X +java.time.LocalDate to Hive string 3084 3199 107 1.6 616.7 0.1X +java.sql.Timestamp to Hive string 6867 6898 27 0.7 1373.4 0.0X +java.time.Instant to Hive string 4199 4265 71 1.2 839.8 0.1X From b4fc4632238ef05c6a1a062dc0aafc44fe549605 Mon Sep 17 00:00:00 2001 From: Licht-T Date: Sun, 28 Jun 2026 15:53:06 +0000 Subject: [PATCH 4/4] Benchmark results for org.apache.spark.sql.execution.benchmark.DateTimeBenchmark (JDK 17, Scala 2.13, split 1 of 1) --- .../benchmarks/DateTimeBenchmark-results.txt | 372 +++++++++--------- 1 file changed, 186 insertions(+), 186 deletions(-) diff --git a/sql/core/benchmarks/DateTimeBenchmark-results.txt b/sql/core/benchmarks/DateTimeBenchmark-results.txt index acf9add823cbf..07d6d086a217c 100644 --- a/sql/core/benchmarks/DateTimeBenchmark-results.txt +++ b/sql/core/benchmarks/DateTimeBenchmark-results.txt @@ -3,21 +3,21 @@ datetime +/- interval ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor datetime +/- interval: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date + interval(m) 1246 1282 51 8.0 124.6 1.0X -date + interval(m, d) 1244 1251 11 8.0 124.4 1.0X -date + interval(m, d, ms) 3756 3761 8 2.7 375.6 0.3X -date - interval(m) 1071 1074 5 9.3 107.1 1.2X -date - interval(m, d) 1099 1117 26 9.1 109.9 1.1X -date - interval(m, d, ms) 3787 3791 5 2.6 378.7 0.3X -timestamp + interval(m) 1819 1823 6 5.5 181.9 0.7X -timestamp + interval(m, d) 1871 1882 16 5.3 187.1 0.7X -timestamp + interval(m, d, ms) 2046 2062 23 4.9 204.6 0.6X -timestamp - interval(m) 1829 1830 2 5.5 182.9 0.7X -timestamp - interval(m, d) 1883 1885 3 5.3 188.3 0.7X -timestamp - interval(m, d, ms) 2057 2058 1 4.9 205.7 0.6X +date + interval(m) 1003 1065 87 10.0 100.3 1.0X +date + interval(m, d) 993 995 2 10.1 99.3 1.0X +date + interval(m, d, ms) 3990 3999 13 2.5 399.0 0.3X +date - interval(m) 956 965 11 10.5 95.6 1.0X +date - interval(m, d) 1011 1042 44 9.9 101.1 1.0X +date - interval(m, d, ms) 4031 4039 11 2.5 403.1 0.2X +timestamp + interval(m) 1812 1826 19 5.5 181.2 0.6X +timestamp + interval(m, d) 1873 1877 6 5.3 187.3 0.5X +timestamp + interval(m, d, ms) 2069 2071 4 4.8 206.9 0.5X +timestamp - interval(m) 1808 1809 1 5.5 180.8 0.6X +timestamp - interval(m, d) 1868 1869 2 5.4 186.8 0.5X +timestamp - interval(m, d, ms) 2042 2046 5 4.9 204.2 0.5X ================================================================================================ @@ -25,95 +25,95 @@ Extract components ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast to timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast to timestamp wholestage off 212 212 0 47.1 21.2 1.0X -cast to timestamp wholestage on 219 226 11 45.6 21.9 1.0X +cast to timestamp wholestage off 205 208 5 48.9 20.5 1.0X +cast to timestamp wholestage on 217 226 15 46.1 21.7 0.9X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor year of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -year of timestamp wholestage off 872 873 2 11.5 87.2 1.0X -year of timestamp wholestage on 873 877 4 11.5 87.3 1.0X +year of timestamp wholestage off 776 778 3 12.9 77.6 1.0X +year of timestamp wholestage on 775 781 7 12.9 77.5 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor quarter of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -quarter of timestamp wholestage off 888 892 6 11.3 88.8 1.0X -quarter of timestamp wholestage on 893 911 23 11.2 89.3 1.0X +quarter of timestamp wholestage off 792 794 2 12.6 79.2 1.0X +quarter of timestamp wholestage on 785 791 5 12.7 78.5 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor month of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -month of timestamp wholestage off 876 877 1 11.4 87.6 1.0X -month of timestamp wholestage on 873 887 19 11.5 87.3 1.0X +month of timestamp wholestage off 764 766 2 13.1 76.4 1.0X +month of timestamp wholestage on 773 779 4 12.9 77.3 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor weekofyear of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -weekofyear of timestamp wholestage off 1159 1211 74 8.6 115.9 1.0X -weekofyear of timestamp wholestage on 1271 1277 4 7.9 127.1 0.9X +weekofyear of timestamp wholestage off 1144 1146 2 8.7 114.4 1.0X +weekofyear of timestamp wholestage on 1163 1166 3 8.6 116.3 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor day of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -day of timestamp wholestage off 863 866 4 11.6 86.3 1.0X -day of timestamp wholestage on 874 884 7 11.4 87.4 1.0X +day of timestamp wholestage off 767 769 2 13.0 76.7 1.0X +day of timestamp wholestage on 774 778 4 12.9 77.4 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofyear of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofyear of timestamp wholestage off 909 932 32 11.0 90.9 1.0X -dayofyear of timestamp wholestage on 907 916 9 11.0 90.7 1.0X +dayofyear of timestamp wholestage off 795 803 12 12.6 79.5 1.0X +dayofyear of timestamp wholestage on 797 801 3 12.6 79.7 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofmonth of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofmonth of timestamp wholestage off 871 871 1 11.5 87.1 1.0X -dayofmonth of timestamp wholestage on 876 879 2 11.4 87.6 1.0X +dayofmonth of timestamp wholestage off 777 781 6 12.9 77.7 1.0X +dayofmonth of timestamp wholestage on 775 778 2 12.9 77.5 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor dayofweek of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -dayofweek of timestamp wholestage off 1038 1052 20 9.6 103.8 1.0X -dayofweek of timestamp wholestage on 1028 1028 1 9.7 102.8 1.0X +dayofweek of timestamp wholestage off 927 928 2 10.8 92.7 1.0X +dayofweek of timestamp wholestage on 924 929 6 10.8 92.4 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor weekday of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -weekday of timestamp wholestage off 1003 1007 5 10.0 100.3 1.0X -weekday of timestamp wholestage on 988 993 4 10.1 98.8 1.0X +weekday of timestamp wholestage off 877 884 10 11.4 87.7 1.0X +weekday of timestamp wholestage on 868 870 2 11.5 86.8 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor hour of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -hour of timestamp wholestage off 659 660 2 15.2 65.9 1.0X -hour of timestamp wholestage on 660 663 3 15.2 66.0 1.0X +hour of timestamp wholestage off 615 617 2 16.3 61.5 1.0X +hour of timestamp wholestage on 621 625 4 16.1 62.1 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor minute of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -minute of timestamp wholestage off 659 661 2 15.2 65.9 1.0X -minute of timestamp wholestage on 665 666 2 15.0 66.5 1.0X +minute of timestamp wholestage off 621 622 1 16.1 62.1 1.0X +minute of timestamp wholestage on 616 623 5 16.2 61.6 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor second of timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -second of timestamp wholestage off 662 663 1 15.1 66.2 1.0X -second of timestamp wholestage on 667 682 15 15.0 66.7 1.0X +second of timestamp wholestage off 622 624 2 16.1 62.2 1.0X +second of timestamp wholestage on 616 620 4 16.2 61.6 1.0X ================================================================================================ @@ -121,18 +121,18 @@ Current date and time ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor current_date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -current_date wholestage off 203 203 0 49.3 20.3 1.0X -current_date wholestage on 223 226 2 44.8 22.3 0.9X +current_date wholestage off 185 186 1 54.0 18.5 1.0X +current_date wholestage on 219 228 10 45.7 21.9 0.8X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor current_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -current_timestamp wholestage off 213 218 7 47.0 21.3 1.0X -current_timestamp wholestage on 232 248 25 43.2 23.2 0.9X +current_timestamp wholestage off 192 196 5 52.0 19.2 1.0X +current_timestamp wholestage on 229 261 43 43.7 22.9 0.8X ================================================================================================ @@ -140,46 +140,46 @@ Date arithmetic ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast to date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast to date wholestage off 753 753 0 13.3 75.3 1.0X -cast to date wholestage on 753 758 6 13.3 75.3 1.0X +cast to date wholestage off 677 678 2 14.8 67.7 1.0X +cast to date wholestage on 674 679 4 14.8 67.4 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor last_day: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -last_day wholestage off 897 900 3 11.1 89.7 1.0X -last_day wholestage on 900 903 2 11.1 90.0 1.0X +last_day wholestage off 774 774 0 12.9 77.4 1.0X +last_day wholestage on 788 796 9 12.7 78.8 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor next_day: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -next_day wholestage off 780 784 5 12.8 78.0 1.0X -next_day wholestage on 797 804 10 12.5 79.7 1.0X +next_day wholestage off 699 700 2 14.3 69.9 1.0X +next_day wholestage on 702 708 6 14.2 70.2 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_add: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_add wholestage off 802 833 45 12.5 80.2 1.0X -date_add wholestage on 743 747 6 13.5 74.3 1.1X +date_add wholestage off 666 668 2 15.0 66.6 1.0X +date_add wholestage on 681 684 2 14.7 68.1 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_sub: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_sub wholestage off 754 757 3 13.3 75.4 1.0X -date_sub wholestage on 746 752 5 13.4 74.6 1.0X +date_sub wholestage off 657 658 2 15.2 65.7 1.0X +date_sub wholestage on 657 663 4 15.2 65.7 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor add_months: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -add_months wholestage off 1038 1038 1 9.6 103.8 1.0X -add_months wholestage on 1042 1049 7 9.6 104.2 1.0X +add_months wholestage off 911 912 1 11.0 91.1 1.0X +add_months wholestage on 920 922 2 10.9 92.0 1.0X ================================================================================================ @@ -187,11 +187,11 @@ Formatting dates ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor format date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -format date wholestage off 3136 3152 23 3.2 313.6 1.0X -format date wholestage on 3129 3142 12 3.2 312.9 1.0X +format date wholestage off 3336 3339 5 3.0 333.6 1.0X +format date wholestage on 3254 3264 8 3.1 325.4 1.0X ================================================================================================ @@ -199,11 +199,11 @@ Formatting timestamps ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor from_unixtime: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -from_unixtime wholestage off 3504 3516 18 2.9 350.4 1.0X -from_unixtime wholestage on 3537 3542 5 2.8 353.7 1.0X +from_unixtime wholestage off 3834 3839 8 2.6 383.4 1.0X +from_unixtime wholestage on 3765 3772 8 2.7 376.5 1.0X ================================================================================================ @@ -211,18 +211,18 @@ Convert timestamps ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor from_utc_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -from_utc_timestamp wholestage off 798 807 13 12.5 79.8 1.0X -from_utc_timestamp wholestage on 850 855 6 11.8 85.0 0.9X +from_utc_timestamp wholestage off 738 738 0 13.6 73.8 1.0X +from_utc_timestamp wholestage on 825 829 4 12.1 82.5 0.9X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_utc_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_utc_timestamp wholestage off 1066 1066 1 9.4 106.6 1.0X -to_utc_timestamp wholestage on 1080 1086 8 9.3 108.0 1.0X +to_utc_timestamp wholestage off 1088 1095 10 9.2 108.8 1.0X +to_utc_timestamp wholestage on 1073 1077 3 9.3 107.3 1.0X ================================================================================================ @@ -230,32 +230,32 @@ Intervals ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor cast interval: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -cast interval wholestage off 234 235 1 42.7 23.4 1.0X -cast interval wholestage on 226 228 3 44.2 22.6 1.0X +cast interval wholestage off 227 234 9 44.0 22.7 1.0X +cast interval wholestage on 219 267 95 45.8 21.9 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor datediff: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -datediff wholestage off 1282 1285 4 7.8 128.2 1.0X -datediff wholestage on 1254 1261 10 8.0 125.4 1.0X +datediff wholestage off 1121 1124 3 8.9 112.1 1.0X +datediff wholestage on 1119 1122 3 8.9 111.9 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor months_between: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -months_between wholestage off 3158 3160 3 3.2 315.8 1.0X -months_between wholestage on 3172 3187 15 3.2 317.2 1.0X +months_between wholestage off 2943 2946 4 3.4 294.3 1.0X +months_between wholestage on 2945 2950 5 3.4 294.5 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor window: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -window wholestage off 571 573 3 1.8 570.7 1.0X -window wholestage on 649 657 7 1.5 649.0 0.9X +window wholestage off 643 645 4 1.6 642.9 1.0X +window wholestage on 663 674 9 1.5 662.6 1.0X ================================================================================================ @@ -263,137 +263,137 @@ Truncation ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YEAR: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YEAR wholestage off 872 879 10 11.5 87.2 1.0X -date_trunc YEAR wholestage on 827 830 3 12.1 82.7 1.1X +date_trunc YEAR wholestage off 520 521 2 19.2 52.0 1.0X +date_trunc YEAR wholestage on 506 509 2 19.8 50.6 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YYYY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YYYY wholestage off 875 877 2 11.4 87.5 1.0X -date_trunc YYYY wholestage on 825 841 16 12.1 82.5 1.1X +date_trunc YYYY wholestage off 519 520 1 19.3 51.9 1.0X +date_trunc YYYY wholestage on 505 509 4 19.8 50.5 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc YY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc YY wholestage off 879 879 0 11.4 87.9 1.0X -date_trunc YY wholestage on 825 834 14 12.1 82.5 1.1X +date_trunc YY wholestage off 518 519 1 19.3 51.8 1.0X +date_trunc YY wholestage on 508 512 5 19.7 50.8 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MON: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MON wholestage off 856 858 3 11.7 85.6 1.0X -date_trunc MON wholestage on 813 819 5 12.3 81.3 1.1X +date_trunc MON wholestage off 519 521 3 19.3 51.9 1.0X +date_trunc MON wholestage on 483 484 1 20.7 48.3 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MONTH: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MONTH wholestage off 857 858 2 11.7 85.7 1.0X -date_trunc MONTH wholestage on 814 825 13 12.3 81.4 1.1X +date_trunc MONTH wholestage off 509 512 4 19.7 50.9 1.0X +date_trunc MONTH wholestage on 482 483 1 20.7 48.2 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MM: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MM wholestage off 858 864 9 11.7 85.8 1.0X -date_trunc MM wholestage on 816 819 3 12.3 81.6 1.1X +date_trunc MM wholestage off 508 509 1 19.7 50.8 1.0X +date_trunc MM wholestage on 480 486 5 20.8 48.0 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc DAY: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc DAY wholestage off 670 684 20 14.9 67.0 1.0X -date_trunc DAY wholestage on 628 636 9 15.9 62.8 1.1X +date_trunc DAY wholestage off 396 399 3 25.2 39.6 1.0X +date_trunc DAY wholestage on 359 361 2 27.9 35.9 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc DD: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc DD wholestage off 671 680 13 14.9 67.1 1.0X -date_trunc DD wholestage on 630 638 11 15.9 63.0 1.1X +date_trunc DD wholestage off 395 396 2 25.3 39.5 1.0X +date_trunc DD wholestage on 356 363 10 28.1 35.6 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc HOUR: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc HOUR wholestage off 660 660 1 15.2 66.0 1.0X -date_trunc HOUR wholestage on 621 622 1 16.1 62.1 1.1X +date_trunc HOUR wholestage off 377 378 1 26.5 37.7 1.0X +date_trunc HOUR wholestage on 337 340 4 29.6 33.7 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc MINUTE: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc MINUTE wholestage off 706 707 1 14.2 70.6 1.0X -date_trunc MINUTE wholestage on 672 677 6 14.9 67.2 1.1X +date_trunc MINUTE wholestage off 376 377 1 26.6 37.6 1.0X +date_trunc MINUTE wholestage on 336 339 2 29.8 33.6 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc SECOND: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc SECOND wholestage off 346 347 1 28.9 34.6 1.0X -date_trunc SECOND wholestage on 302 308 6 33.2 30.2 1.1X +date_trunc SECOND wholestage off 317 317 0 31.6 31.7 1.0X +date_trunc SECOND wholestage on 276 279 3 36.2 27.6 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc WEEK: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc WEEK wholestage off 732 733 1 13.7 73.2 1.0X -date_trunc WEEK wholestage on 690 698 12 14.5 69.0 1.1X +date_trunc WEEK wholestage off 427 428 1 23.4 42.7 1.0X +date_trunc WEEK wholestage on 381 383 1 26.2 38.1 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor date_trunc QUARTER: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -date_trunc QUARTER wholestage off 1030 1032 2 9.7 103.0 1.0X -date_trunc QUARTER wholestage on 989 992 3 10.1 98.9 1.0X +date_trunc QUARTER wholestage off 655 655 0 15.3 65.5 1.0X +date_trunc QUARTER wholestage on 623 625 2 16.1 62.3 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc year: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc year wholestage off 1054 1057 4 9.5 105.4 1.0X -trunc year wholestage on 1003 1004 1 10.0 100.3 1.1X +trunc year wholestage off 922 923 2 10.8 92.2 1.0X +trunc year wholestage on 898 902 2 11.1 89.8 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc yyyy: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc yyyy wholestage off 1054 1056 3 9.5 105.4 1.0X -trunc yyyy wholestage on 1004 1008 3 10.0 100.4 1.0X +trunc yyyy wholestage off 920 923 4 10.9 92.0 1.0X +trunc yyyy wholestage on 898 900 2 11.1 89.8 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc yy: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc yy wholestage off 1054 1054 1 9.5 105.4 1.0X -trunc yy wholestage on 1002 1007 3 10.0 100.2 1.1X +trunc yy wholestage off 921 921 1 10.9 92.1 1.0X +trunc yy wholestage on 899 904 5 11.1 89.9 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc mon: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc mon wholestage off 1022 1039 24 9.8 102.2 1.0X -trunc mon wholestage on 965 971 7 10.4 96.5 1.1X +trunc mon wholestage off 899 900 0 11.1 89.9 1.0X +trunc mon wholestage on 868 872 3 11.5 86.8 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc month: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc month wholestage off 1013 1033 28 9.9 101.3 1.0X -trunc month wholestage on 966 974 11 10.4 96.6 1.0X +trunc month wholestage off 900 913 18 11.1 90.0 1.0X +trunc month wholestage on 870 872 2 11.5 87.0 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor trunc mm: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -trunc mm wholestage off 1007 1008 2 9.9 100.7 1.0X -trunc mm wholestage on 963 966 2 10.4 96.3 1.0X +trunc mm wholestage off 896 897 2 11.2 89.6 1.0X +trunc mm wholestage on 871 872 1 11.5 87.1 1.0X ================================================================================================ @@ -401,39 +401,39 @@ Parsing ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to timestamp str: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to timestamp str wholestage off 104 106 2 9.6 104.1 1.0X -to timestamp str wholestage on 108 110 1 9.2 108.4 1.0X +to timestamp str wholestage off 108 108 0 9.2 108.2 1.0X +to timestamp str wholestage on 103 108 5 9.7 102.7 1.1X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_timestamp wholestage off 666 667 2 1.5 666.1 1.0X -to_timestamp wholestage on 688 692 7 1.5 687.8 1.0X +to_timestamp wholestage off 748 749 2 1.3 747.5 1.0X +to_timestamp wholestage on 744 750 8 1.3 744.1 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_unix_timestamp: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_unix_timestamp wholestage off 678 678 1 1.5 677.8 1.0X -to_unix_timestamp wholestage on 660 664 5 1.5 660.2 1.0X +to_unix_timestamp wholestage off 741 743 2 1.3 741.2 1.0X +to_unix_timestamp wholestage on 750 752 2 1.3 750.2 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to date str: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to date str wholestage off 141 141 0 7.1 141.2 1.0X -to date str wholestage on 138 139 1 7.3 137.7 1.0X +to date str wholestage off 149 149 1 6.7 148.8 1.0X +to date str wholestage on 143 144 1 7.0 143.1 1.0X OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor to_date: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -to_date wholestage off 602 603 2 1.7 601.7 1.0X -to_date wholestage on 587 590 3 1.7 587.1 1.0X +to_date wholestage off 654 656 3 1.5 653.6 1.0X +to_date wholestage on 648 650 3 1.5 647.8 1.0X ================================================================================================ @@ -441,21 +441,21 @@ Conversion from/to external types ================================================================================================ OpenJDK 64-Bit Server VM 17.0.19+10-LTS on Linux 6.17.0-1018-azure -AMD EPYC 9V74 80-Core Processor +AMD EPYC 7763 64-Core Processor To/from Java's date-time: Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative ------------------------------------------------------------------------------------------------------------------------ -From java.sql.Date 313 315 1 16.0 62.7 1.0X -From java.time.LocalDate 268 270 2 18.6 53.6 1.2X -Collect java.sql.Date 1300 1380 100 3.8 259.9 0.2X -Collect java.time.LocalDate 1074 1134 94 4.7 214.8 0.3X -From java.sql.Timestamp 223 245 19 22.4 44.7 1.4X -From java.time.Instant 225 241 14 22.2 45.0 1.4X -Collect longs 805 893 99 6.2 161.0 0.4X -Collect java.sql.Timestamp 979 1167 189 5.1 195.8 0.3X -Collect java.time.Instant 960 1062 107 5.2 192.1 0.3X -java.sql.Date to Hive string 3913 4064 209 1.3 782.5 0.1X -java.time.LocalDate to Hive string 3145 3256 108 1.6 629.0 0.1X -java.sql.Timestamp to Hive string 6279 6307 26 0.8 1255.8 0.0X -java.time.Instant to Hive string 4770 4858 111 1.0 954.0 0.1X +From java.sql.Date 290 292 2 17.2 58.1 1.0X +From java.time.LocalDate 252 255 5 19.9 50.3 1.2X +Collect java.sql.Date 1265 1312 73 4.0 253.0 0.2X +Collect java.time.LocalDate 893 1040 127 5.6 178.7 0.3X +From java.sql.Timestamp 233 239 6 21.4 46.7 1.2X +From java.time.Instant 214 230 27 23.4 42.8 1.4X +Collect longs 833 961 120 6.0 166.5 0.3X +Collect java.sql.Timestamp 840 1097 237 6.0 167.9 0.3X +Collect java.time.Instant 950 974 22 5.3 190.0 0.3X +java.sql.Date to Hive string 3994 4091 98 1.3 798.9 0.1X +java.time.LocalDate to Hive string 3295 3359 56 1.5 659.0 0.1X +java.sql.Timestamp to Hive string 6313 6475 141 0.8 1262.7 0.0X +java.time.Instant to Hive string 5043 5078 52 1.0 1008.5 0.1X