You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by we...@apache.org on 2020/04/14 04:51:55 UTC

[spark] branch branch-3.0 updated: [SPARK-31426][SQL] Fix perf regressions of toJavaTimestamp/fromJavaTimestamp

This is an automated email from the ASF dual-hosted git repository.

wenchen pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new fef8721  [SPARK-31426][SQL] Fix perf regressions of toJavaTimestamp/fromJavaTimestamp
fef8721 is described below

commit fef8721949286bf8443db99df51cc9c0648703bc
Author: Max Gekk <ma...@gmail.com>
AuthorDate: Tue Apr 14 04:50:20 2020 +0000

    [SPARK-31426][SQL] Fix perf regressions of toJavaTimestamp/fromJavaTimestamp
    
    ### What changes were proposed in this pull request?
    Reuse the `rebaseGregorianToJulianMicros()` and `rebaseJulianToGregorianMicros()` functions introduced by the PR #28119 in `DateTimeUtils`.`toJavaTimestamp()` and `fromJavaTimestamp()`. Actually, new implementation is derived from Spark 2.4 + rebasing via pre-calculated rebasing maps.
    
    ### Why are the changes needed?
    The changes speed up conversions to/from java.sql.Timestamp, and as a consequence the PR improve performance of ORC datasource in loading/saving timestamps:
    - Saving ~ **x2.8 faster** in master, and -11% against Spark 2.4.6
    - Loading - **x3.2-4.5 faster** in master, -5% against Spark 2.4.6
    
    Before:
    ```
    Save timestamps to ORC:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
    ------------------------------------------------------------------------------------------------------------------------
    after 1582                                        59877          59877           0          1.7         598.8       0.0X
    before 1582                                       61361          61361           0          1.6         613.6       0.0X
    
    Load timestamps from ORC:                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
    ------------------------------------------------------------------------------------------------------------------------
    after 1582, vec off                               48197          48288         118          2.1         482.0       1.0X
    after 1582, vec on                                38247          38351         128          2.6         382.5       1.3X
    before 1582, vec off                              53179          53359         249          1.9         531.8       0.9X
    before 1582, vec on                               44076          44268         269          2.3         440.8       1.1X
    ```
    
    After:
    ```
    Save timestamps to ORC:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
    ------------------------------------------------------------------------------------------------------------------------
    after 1582                                        21250          21250           0          4.7         212.5       0.1X
    before 1582                                       22105          22105           0          4.5         221.0       0.1X
    
    Load timestamps from ORC:                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
    ------------------------------------------------------------------------------------------------------------------------
    after 1582, vec off                               14903          14933          40          6.7         149.0       1.0X
    after 1582, vec on                                 8342           8426          73         12.0          83.4       1.8X
    before 1582, vec off                              15528          15575          76          6.4         155.3       1.0X
    before 1582, vec on                                9025           9075          61         11.1          90.2       1.7X
    ```
    
    Spark 2.4.6-SNAPSHOT:
    ```
    Save timestamps to ORC:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
    ------------------------------------------------------------------------------------------------------------------------
    after 1582                                        18858          18858           0          5.3         188.6       1.0X
    before 1582                                       18508          18508           0          5.4         185.1       1.0X
    
    Load timestamps from ORC:                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
    ------------------------------------------------------------------------------------------------------------------------
    after 1582, vec off                               14063          14177         143          7.1         140.6       1.0X
    after 1582, vec on                                 5955           6029         100         16.8          59.5       2.4X
    before 1582, vec off                              14119          14126           7          7.1         141.2       1.0X
    before 1582, vec on                                5991           6007          25         16.7          59.9       2.3X
    ```
    
    ### Does this PR introduce any user-facing change?
    Yes, the `to_utc_timestamp` function returns the later local timestamp in the case of overlapping local timestamps at daylight saving time. it's changed back to the 2.4 behavior.
    
    ### How was this patch tested?
    - By existing test suite `DateTimeUtilsSuite`, `RebaseDateTimeSuite`, `DateFunctionsSuite`, `DateExpressionsSuites`, `ParquetIOSuite`, `OrcHadoopFsRelationSuite`.
    - Re-generating results of the benchmarks `DateTimeBenchmark` and `DateTimeRebaseBenchmark` in the environment:
    
    | Item | Description |
    | ---- | ----|
    | Region | us-west-2 (Oregon) |
    | Instance | r3.xlarge |
    | AMI | ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20190722.1 (ami-06f2f779464715dc5) |
    | Java | OpenJDK 64-Bit Server VM 1.8.0_242 and OpenJDK 64-Bit Server VM 11.0.6+10 |
    
    Closes #28189 from MaxGekk/optimize-to-from-java-timestamp.
    
    Authored-by: Max Gekk <ma...@gmail.com>
    Signed-off-by: Wenchen Fan <we...@databricks.com>
    (cherry picked from commit a0f8cc08a3ca006adf2e63c7c8d5f266dba46328)
    Signed-off-by: Wenchen Fan <we...@databricks.com>
---
 .../spark/sql/catalyst/util/DateTimeUtils.scala    |  21 +-
 .../sql/catalyst/util/DateTimeUtilsSuite.scala     |   4 +-
 .../benchmarks/DateTimeBenchmark-jdk11-results.txt | 218 ++++++++++-----------
 sql/core/benchmarks/DateTimeBenchmark-results.txt  | 218 ++++++++++-----------
 .../DateTimeRebaseBenchmark-jdk11-results.txt      |  88 ++++-----
 .../benchmarks/DateTimeRebaseBenchmark-results.txt |  88 ++++-----
 6 files changed, 316 insertions(+), 321 deletions(-)

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 33e05c5..7ce0fa2 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
@@ -150,8 +150,12 @@ object DateTimeUtils {
    * @return A `java.sql.Timestamp` from number of micros since epoch.
    */
   def toJavaTimestamp(us: SQLTimestamp): Timestamp = {
-    val ldt = microsToInstant(us).atZone(ZoneId.systemDefault()).toLocalDateTime
-    Timestamp.valueOf(ldt)
+    val rebasedMicros = rebaseGregorianToJulianMicros(us)
+    val seconds = Math.floorDiv(rebasedMicros, MICROS_PER_SECOND)
+    val ts = new Timestamp(seconds * MILLIS_PER_SECOND)
+    val nanos = (rebasedMicros - seconds * MICROS_PER_SECOND) * NANOS_PER_MICROS
+    ts.setNanos(nanos.toInt)
+    ts
   }
 
   /**
@@ -174,17 +178,8 @@ object DateTimeUtils {
    * @return The number of micros since epoch from `java.sql.Timestamp`.
    */
   def fromJavaTimestamp(t: Timestamp): SQLTimestamp = {
-    val era = if (t.before(julianCommonEraStart)) 0 else 1
-    val localDateTime = LocalDateTime.of(
-      t.getYear + 1900, t.getMonth + 1, 1,
-      t.getHours, t.getMinutes, t.getSeconds, t.getNanos)
-      .`with`(ChronoField.ERA, era)
-      // Add days separately to convert dates existed in Julian calendar but not
-      // in Proleptic Gregorian calendar. For example, 1000-02-29 is valid date
-      // in Julian calendar because 1000 is a leap year but 1000 is not a leap
-      // year in Proleptic Gregorian calendar. And 1000-02-29 doesn't exist in it.
-      .plusDays(t.getDate - 1) // Returns the next valid date after `date.getDate - 1` days
-    instantToMicros(localDateTime.atZone(ZoneId.systemDefault).toInstant)
+    val micros = millisToMicros(t.getTime) + (t.getNanos / NANOS_PER_MICROS) % MICROS_PER_MILLIS
+    rebaseJulianToGregorianMicros(micros)
   }
 
   /**
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
index 7459044..6a1ee9f 100644
--- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
+++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
@@ -496,8 +496,8 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper {
       test("2016-03-13 02:00:00", tz, "2016-03-13 10:00:00.0")
       test("2016-03-13 03:00:00", tz, "2016-03-13 10:00:00.0")
       test("2016-11-06 00:59:59", tz, "2016-11-06 07:59:59.0")
-      test("2016-11-06 01:00:00", tz, "2016-11-06 08:00:00.0")
-      test("2016-11-06 01:59:59", tz, "2016-11-06 08:59:59.0")
+      test("2016-11-06 01:00:00", tz, "2016-11-06 09:00:00.0")
+      test("2016-11-06 01:59:59", tz, "2016-11-06 09:59:59.0")
       test("2016-11-06 02:00:00", tz, "2016-11-06 10:00:00.0")
     }
   }
diff --git a/sql/core/benchmarks/DateTimeBenchmark-jdk11-results.txt b/sql/core/benchmarks/DateTimeBenchmark-jdk11-results.txt
index df9735c..27917c2 100644
--- a/sql/core/benchmarks/DateTimeBenchmark-jdk11-results.txt
+++ b/sql/core/benchmarks/DateTimeBenchmark-jdk11-results.txt
@@ -6,92 +6,92 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 cast to timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-cast to timestamp wholestage off                    411            449          54         24.3          41.1       1.0X
-cast to timestamp wholestage on                     392            408          11         25.5          39.2       1.0X
+cast to timestamp wholestage off                    447            486          54         22.4          44.7       1.0X
+cast to timestamp wholestage on                     364            381          14         27.5          36.4       1.2X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 year of timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-year of timestamp wholestage off                   1368           1376          11          7.3         136.8       1.0X
-year of timestamp wholestage on                    1272           1293          21          7.9         127.2       1.1X
+year of timestamp wholestage off                   1366           1374          11          7.3         136.6       1.0X
+year of timestamp wholestage on                    1278           1302          21          7.8         127.8       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 quarter of timestamp:                     Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-quarter of timestamp wholestage off                1607           1632          34          6.2         160.7       1.0X
-quarter of timestamp wholestage on                 1534           1553          22          6.5         153.4       1.0X
+quarter of timestamp wholestage off                1606           1622          23          6.2         160.6       1.0X
+quarter of timestamp wholestage on                 1569           1584          16          6.4         156.9       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 month of timestamp:                       Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-month of timestamp wholestage off                  1252           1259          10          8.0         125.2       1.0X
-month of timestamp wholestage on                   1270           1282          13          7.9         127.0       1.0X
+month of timestamp wholestage off                  1243           1259          24          8.0         124.3       1.0X
+month of timestamp wholestage on                   1267           1282          13          7.9         126.7       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 weekofyear of timestamp:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-weekofyear of timestamp wholestage off             2234           2242          12          4.5         223.4       1.0X
-weekofyear of timestamp wholestage on              1830           1844          10          5.5         183.0       1.2X
+weekofyear of timestamp wholestage off             1837           1846          12          5.4         183.7       1.0X
+weekofyear of timestamp wholestage on              1842           1848           4          5.4         184.2       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 day of timestamp:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-day of timestamp wholestage off                    1248           1256          11          8.0         124.8       1.0X
-day of timestamp wholestage on                     1248           1255          10          8.0         124.8       1.0X
+day of timestamp wholestage off                    1262           1289          39          7.9         126.2       1.0X
+day of timestamp wholestage on                     1263           1268           6          7.9         126.3       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 dayofyear of timestamp:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-dayofyear of timestamp wholestage off              1290           1303          18          7.8         129.0       1.0X
-dayofyear of timestamp wholestage on               1285           1306          20          7.8         128.5       1.0X
+dayofyear of timestamp wholestage off              1302           1308           8          7.7         130.2       1.0X
+dayofyear of timestamp wholestage on               1300           1308           8          7.7         130.0       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 dayofmonth of timestamp:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-dayofmonth of timestamp wholestage off             1261           1263           2          7.9         126.1       1.0X
-dayofmonth of timestamp wholestage on              1253           1259           5          8.0         125.3       1.0X
+dayofmonth of timestamp wholestage off             1244           1248           6          8.0         124.4       1.0X
+dayofmonth of timestamp wholestage on              1253           1263          10          8.0         125.3       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 dayofweek of timestamp:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-dayofweek of timestamp wholestage off              1419           1421           2          7.0         141.9       1.0X
-dayofweek of timestamp wholestage on               1406           1417          11          7.1         140.6       1.0X
+dayofweek of timestamp wholestage off              1407           1408           2          7.1         140.7       1.0X
+dayofweek of timestamp wholestage on               1411           1432          14          7.1         141.1       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 weekday of timestamp:                     Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-weekday of timestamp wholestage off                1346           1350           6          7.4         134.6       1.0X
-weekday of timestamp wholestage on                 1348           1360          10          7.4         134.8       1.0X
+weekday of timestamp wholestage off                1349           1352           5          7.4         134.9       1.0X
+weekday of timestamp wholestage on                 1347           1354          10          7.4         134.7       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 hour of timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-hour of timestamp wholestage off                   1051           1057           8          9.5         105.1       1.0X
-hour of timestamp wholestage on                     991           1002           9         10.1          99.1       1.1X
+hour of timestamp wholestage off                   1038           1041           5          9.6         103.8       1.0X
+hour of timestamp wholestage on                     983            995           9         10.2          98.3       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 minute of timestamp:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-minute of timestamp wholestage off                 1041           1042           1          9.6         104.1       1.0X
-minute of timestamp wholestage on                   971            978           9         10.3          97.1       1.1X
+minute of timestamp wholestage off                 1042           1043           1          9.6         104.2       1.0X
+minute of timestamp wholestage on                  1022           1030           9          9.8         102.2       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 second of timestamp:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-second of timestamp wholestage off                  989            991           3         10.1          98.9       1.0X
-second of timestamp wholestage on                   986            999          12         10.1          98.6       1.0X
+second of timestamp wholestage off                  978            979           2         10.2          97.8       1.0X
+second of timestamp wholestage on                  1016           1028          21          9.8         101.6       1.0X
 
 
 ================================================================================================
@@ -102,15 +102,15 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 current_date:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-current_date wholestage off                         305            313          12         32.8          30.5       1.0X
-current_date wholestage on                          302            316          17         33.1          30.2       1.0X
+current_date wholestage off                         295            299           6         33.9          29.5       1.0X
+current_date wholestage on                          321            327           7         31.2          32.1       0.9X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 current_timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-current_timestamp wholestage off                    359            388          41         27.8          35.9       1.0X
-current_timestamp wholestage on                     300            412         143         33.3          30.0       1.2X
+current_timestamp wholestage off                    342            387          63         29.2          34.2       1.0X
+current_timestamp wholestage on                     324            376          97         30.9          32.4       1.1X
 
 
 ================================================================================================
@@ -121,43 +121,43 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 cast to date:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-cast to date wholestage off                        1080           1083           5          9.3         108.0       1.0X
-cast to date wholestage on                         1045           1055          10          9.6         104.5       1.0X
+cast to date wholestage off                        1065           1067           3          9.4         106.5       1.0X
+cast to date wholestage on                         1044           1053          10          9.6         104.4       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 last_day:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-last_day wholestage off                            1253           1253           1          8.0         125.3       1.0X
-last_day wholestage on                             1257           1272          20          8.0         125.7       1.0X
+last_day wholestage off                            1241           1245           6          8.1         124.1       1.0X
+last_day wholestage on                             1276           1287          11          7.8         127.6       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 next_day:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-next_day wholestage off                            1129           1137          11          8.9         112.9       1.0X
-next_day wholestage on                             1083           1092          11          9.2         108.3       1.0X
+next_day wholestage off                            1130           1150          28          8.8         113.0       1.0X
+next_day wholestage on                             1086           1096           8          9.2         108.6       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_add:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_add wholestage off                            1067           1071           6          9.4         106.7       1.0X
-date_add wholestage on                             1061           1072           7          9.4         106.1       1.0X
+date_add wholestage off                            1048           1054           9          9.5         104.8       1.0X
+date_add wholestage on                             1077           1079           2          9.3         107.7       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_sub:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_sub wholestage off                            1065           1068           4          9.4         106.5       1.0X
-date_sub wholestage on                             1065           1072           6          9.4         106.5       1.0X
+date_sub wholestage off                            1047           1052           7          9.6         104.7       1.0X
+date_sub wholestage on                             1078           1087           7          9.3         107.8       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 add_months:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-add_months wholestage off                          1404           1409           7          7.1         140.4       1.0X
-add_months wholestage on                           1429           1439          15          7.0         142.9       1.0X
+add_months wholestage off                          1392           1421          41          7.2         139.2       1.0X
+add_months wholestage on                           1441           1447           6          6.9         144.1       1.0X
 
 
 ================================================================================================
@@ -168,8 +168,8 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 format date:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-format date wholestage off                         5642           5741         140          1.8         564.2       1.0X
-format date wholestage on                          5874           5900          18          1.7         587.4       1.0X
+format date wholestage off                         6034           6047          19          1.7         603.4       1.0X
+format date wholestage on                          5874           5891          16          1.7         587.4       1.0X
 
 
 ================================================================================================
@@ -180,8 +180,8 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 from_unixtime:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-from_unixtime wholestage off                       7504           7515          15          1.3         750.4       1.0X
-from_unixtime wholestage on                        7579           7612          37          1.3         757.9       1.0X
+from_unixtime wholestage off                       7350           7371          29          1.4         735.0       1.0X
+from_unixtime wholestage on                        7415           7428          13          1.3         741.5       1.0X
 
 
 ================================================================================================
@@ -192,15 +192,15 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 from_utc_timestamp:                       Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-from_utc_timestamp wholestage off                  1250           1254           6          8.0         125.0       1.0X
-from_utc_timestamp wholestage on                   1287           1294          10          7.8         128.7       1.0X
+from_utc_timestamp wholestage off                  1235           1236           2          8.1         123.5       1.0X
+from_utc_timestamp wholestage on                   1300           1309          10          7.7         130.0       0.9X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to_utc_timestamp:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to_utc_timestamp wholestage off                    1916           1918           2          5.2         191.6       1.0X
-to_utc_timestamp wholestage on                     1781           1792          12          5.6         178.1       1.1X
+to_utc_timestamp wholestage off                    1798           1805          10          5.6         179.8       1.0X
+to_utc_timestamp wholestage on                     1765           1779          11          5.7         176.5       1.0X
 
 
 ================================================================================================
@@ -211,29 +211,29 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 cast interval:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-cast interval wholestage off                        347            354           9         28.8          34.7       1.0X
-cast interval wholestage on                         308            313           3         32.5          30.8       1.1X
+cast interval wholestage off                        345            350           7         29.0          34.5       1.0X
+cast interval wholestage on                         325            337          11         30.7          32.5       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 datediff:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-datediff wholestage off                            1884           1895          15          5.3         188.4       1.0X
-datediff wholestage on                             1824           1833           9          5.5         182.4       1.0X
+datediff wholestage off                            1833           1834           2          5.5         183.3       1.0X
+datediff wholestage on                             1807           1815           9          5.5         180.7       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 months_between:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-months_between wholestage off                      5674           5685          16          1.8         567.4       1.0X
-months_between wholestage on                       5600           5616          14          1.8         560.0       1.0X
+months_between wholestage off                      5938           5941           4          1.7         593.8       1.0X
+months_between wholestage on                       5891           5920          19          1.7         589.1       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 window:                                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-window wholestage off                              1971           2180         295          0.5        1971.1       1.0X
-window wholestage on                              47323          47354          35          0.0       47322.7       0.0X
+window wholestage off                              2153           2313         226          0.5        2153.3       1.0X
+window wholestage on                              47097          47143          31          0.0       47097.0       0.0X
 
 
 ================================================================================================
@@ -244,134 +244,134 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc YEAR:                          Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc YEAR wholestage off                     2571           2588          23          3.9         257.1       1.0X
-date_trunc YEAR wholestage on                      2581           2591           6          3.9         258.1       1.0X
+date_trunc YEAR wholestage off                     2458           2461           5          4.1         245.8       1.0X
+date_trunc YEAR wholestage on                      2433           2441           6          4.1         243.3       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc YYYY:                          Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc YYYY wholestage off                     2564           2568           5          3.9         256.4       1.0X
-date_trunc YYYY wholestage on                      2583           2592           6          3.9         258.3       1.0X
+date_trunc YYYY wholestage off                     2454           2457           4          4.1         245.4       1.0X
+date_trunc YYYY wholestage on                      2436           2442           7          4.1         243.6       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc YY:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc YY wholestage off                       2574           2577           5          3.9         257.4       1.0X
-date_trunc YY wholestage on                        2579           2588           8          3.9         257.9       1.0X
+date_trunc YY wholestage off                       2467           2469           3          4.1         246.7       1.0X
+date_trunc YY wholestage on                        2435           2448          18          4.1         243.5       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc MON:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc MON wholestage off                      2598           2599           1          3.8         259.8       1.0X
-date_trunc MON wholestage on                       2593           2604          11          3.9         259.3       1.0X
+date_trunc MON wholestage off                      2494           2494           1          4.0         249.4       1.0X
+date_trunc MON wholestage on                       2428           2441          14          4.1         242.8       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc MONTH:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc MONTH wholestage off                    2599           2613          19          3.8         259.9       1.0X
-date_trunc MONTH wholestage on                     2604           2610           5          3.8         260.4       1.0X
+date_trunc MONTH wholestage off                    2502           2510          12          4.0         250.2       1.0X
+date_trunc MONTH wholestage on                     2438           2444           6          4.1         243.8       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc MM:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc MM wholestage off                       2605           2613          10          3.8         260.5       1.0X
-date_trunc MM wholestage on                        2595           2601           4          3.9         259.5       1.0X
+date_trunc MM wholestage off                       2486           2487           1          4.0         248.6       1.0X
+date_trunc MM wholestage on                        2436           2441           4          4.1         243.6       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc DAY:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc DAY wholestage off                      2361           2367           9          4.2         236.1       1.0X
-date_trunc DAY wholestage on                       2370           2383          11          4.2         237.0       1.0X
+date_trunc DAY wholestage off                      2406           2421          21          4.2         240.6       1.0X
+date_trunc DAY wholestage on                       2352           2370          23          4.3         235.2       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc DD:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc DD wholestage off                       2376           2385          13          4.2         237.6       1.0X
-date_trunc DD wholestage on                        2368           2372           3          4.2         236.8       1.0X
+date_trunc DD wholestage off                       2414           2417           5          4.1         241.4       1.0X
+date_trunc DD wholestage on                        2355           2366           8          4.2         235.5       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc HOUR:                          Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc HOUR wholestage off                     2399           2404           7          4.2         239.9       1.0X
-date_trunc HOUR wholestage on                      2387           2399          14          4.2         238.7       1.0X
+date_trunc HOUR wholestage off                     2419           2426          10          4.1         241.9       1.0X
+date_trunc HOUR wholestage on                      2369           2374           4          4.2         236.9       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc MINUTE:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc MINUTE wholestage off                    357            370          18         28.0          35.7       1.0X
-date_trunc MINUTE wholestage on                     373            378           5         26.8          37.3       1.0X
+date_trunc MINUTE wholestage off                    357            378          30         28.0          35.7       1.0X
+date_trunc MINUTE wholestage on                     331            335           4         30.2          33.1       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc SECOND:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc SECOND wholestage off                    382            382           1         26.2          38.2       1.0X
-date_trunc SECOND wholestage on                     372            380           8         26.9          37.2       1.0X
+date_trunc SECOND wholestage off                    373            375           3         26.8          37.3       1.0X
+date_trunc SECOND wholestage on                     330            335           4         30.3          33.0       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc WEEK:                          Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc WEEK wholestage off                     2501           2512          14          4.0         250.1       1.0X
-date_trunc WEEK wholestage on                      2484           2498          12          4.0         248.4       1.0X
+date_trunc WEEK wholestage off                     2479           2480           2          4.0         247.9       1.0X
+date_trunc WEEK wholestage on                      2441           2450           8          4.1         244.1       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc QUARTER:                       Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc QUARTER wholestage off                  3407           3410           4          2.9         340.7       1.0X
-date_trunc QUARTER wholestage on                   3371           3378           5          3.0         337.1       1.0X
+date_trunc QUARTER wholestage off                  3337           3337           0          3.0         333.7       1.0X
+date_trunc QUARTER wholestage on                   3235           3244           8          3.1         323.5       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc year:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc year wholestage off                           318            319           2         31.4          31.8       1.0X
-trunc year wholestage on                            343            347           8         29.2          34.3       0.9X
+trunc year wholestage off                           315            316           1         31.7          31.5       1.0X
+trunc year wholestage on                            293            302          16         34.2          29.3       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc yyyy:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc yyyy wholestage off                           315            316           2         31.7          31.5       1.0X
-trunc yyyy wholestage on                            342            355          18         29.2          34.2       0.9X
+trunc yyyy wholestage off                           312            314           3         32.0          31.2       1.0X
+trunc yyyy wholestage on                            295            300           8         33.9          29.5       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc yy:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc yy wholestage off                             317            318           1         31.5          31.7       1.0X
-trunc yy wholestage on                              339            348          12         29.5          33.9       0.9X
+trunc yy wholestage off                             311            317           8         32.1          31.1       1.0X
+trunc yy wholestage on                              294            302           7         34.0          29.4       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc mon:                                Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc mon wholestage off                            317            319           3         31.5          31.7       1.0X
-trunc mon wholestage on                             337            349          10         29.7          33.7       0.9X
+trunc mon wholestage off                            312            314           3         32.0          31.2       1.0X
+trunc mon wholestage on                             296            299           5         33.8          29.6       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc month:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc month wholestage off                          315            316           1         31.7          31.5       1.0X
-trunc month wholestage on                           341            352          14         29.3          34.1       0.9X
+trunc month wholestage off                          311            311           0         32.1          31.1       1.0X
+trunc month wholestage on                           293            297           4         34.2          29.3       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc mm:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc mm wholestage off                             314            315           1         31.8          31.4       1.0X
-trunc mm wholestage on                              343            348           8         29.2          34.3       0.9X
+trunc mm wholestage off                             315            320           7         31.7          31.5       1.0X
+trunc mm wholestage on                              291            296           8         34.4          29.1       1.1X
 
 
 ================================================================================================
@@ -382,36 +382,36 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to timestamp str:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to timestamp str wholestage off                     163            165           2          6.1         163.2       1.0X
-to timestamp str wholestage on                      158            159           1          6.3         157.7       1.0X
+to timestamp str wholestage off                     161            171          15          6.2         160.6       1.0X
+to timestamp str wholestage on                      152            154           1          6.6         151.6       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to_timestamp:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to_timestamp wholestage off                        1490           1491           2          0.7        1489.5       1.0X
-to_timestamp wholestage on                         1522           1530          10          0.7        1522.0       1.0X
+to_timestamp wholestage off                        1441           1450          13          0.7        1440.6       1.0X
+to_timestamp wholestage on                         1371           1381          20          0.7        1370.8       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to_unix_timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to_unix_timestamp wholestage off                   1561           1574          18          0.6        1561.4       1.0X
-to_unix_timestamp wholestage on                    1531           1540           9          0.7        1531.4       1.0X
+to_unix_timestamp wholestage off                   1329           1335           9          0.8        1328.7       1.0X
+to_unix_timestamp wholestage on                    1354           1357           4          0.7        1353.7       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to date str:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to date str wholestage off                          206            219          18          4.9         206.1       1.0X
-to date str wholestage on                           211            214           4          4.7         211.1       1.0X
+to date str wholestage off                          212            213           2          4.7         211.7       1.0X
+to date str wholestage on                           206            207           1          4.9         205.9       1.0X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to_date:                                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to_date wholestage off                             3195           3208          18          0.3        3195.3       1.0X
-to_date wholestage on                              3179           3189          12          0.3        3179.2       1.0X
+to_date wholestage off                             3255           3309          76          0.3        3255.0       1.0X
+to_date wholestage on                              3146           3168          23          0.3        3146.4       1.0X
 
 
 ================================================================================================
@@ -422,8 +422,8 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 To/from java.sql.Timestamp:               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-From java.sql.Timestamp                            1390           1400           9          3.6         277.9       1.0X
-Collect longs                                      1781           2342         496          2.8         356.2       0.8X
-Collect timestamps                                 5837           6037         180          0.9        1167.3       0.2X
+From java.sql.Timestamp                             359            365           8         13.9          71.8       1.0X
+Collect longs                                      1832           1895          84          2.7         366.3       0.2X
+Collect timestamps                                 1811           2046         247          2.8         362.2       0.2X
 
 
diff --git a/sql/core/benchmarks/DateTimeBenchmark-results.txt b/sql/core/benchmarks/DateTimeBenchmark-results.txt
index 346fbd3..ee70aa3 100644
--- a/sql/core/benchmarks/DateTimeBenchmark-results.txt
+++ b/sql/core/benchmarks/DateTimeBenchmark-results.txt
@@ -6,92 +6,92 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 cast to timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-cast to timestamp wholestage off                    413            435          31         24.2          41.3       1.0X
-cast to timestamp wholestage on                     357            375          16         28.0          35.7       1.2X
+cast to timestamp wholestage off                    416            439          32         24.0          41.6       1.0X
+cast to timestamp wholestage on                     370            399          31         27.1          37.0       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 year of timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-year of timestamp wholestage off                   1311           1335          34          7.6         131.1       1.0X
-year of timestamp wholestage on                    1541           1561          21          6.5         154.1       0.9X
+year of timestamp wholestage off                   1328           1343          21          7.5         132.8       1.0X
+year of timestamp wholestage on                    1204           1247          27          8.3         120.4       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 quarter of timestamp:                     Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-quarter of timestamp wholestage off                1449           1467          26          6.9         144.9       1.0X
-quarter of timestamp wholestage on                 1403           1418          12          7.1         140.3       1.0X
+quarter of timestamp wholestage off                1447           1451           6          6.9         144.7       1.0X
+quarter of timestamp wholestage on                 1384           1392           7          7.2         138.4       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 month of timestamp:                       Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-month of timestamp wholestage off                  1221           1231          14          8.2         122.1       1.0X
-month of timestamp wholestage on                   1252           1266           8          8.0         125.2       1.0X
+month of timestamp wholestage off                  1233           1238           6          8.1         123.3       1.0X
+month of timestamp wholestage on                   1232           1252          15          8.1         123.2       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 weekofyear of timestamp:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-weekofyear of timestamp wholestage off             1939           1947          11          5.2         193.9       1.0X
-weekofyear of timestamp wholestage on              1932           1942           9          5.2         193.2       1.0X
+weekofyear of timestamp wholestage off             1921           1923           3          5.2         192.1       1.0X
+weekofyear of timestamp wholestage on              1893           1914          14          5.3         189.3       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 day of timestamp:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-day of timestamp wholestage off                    1216           1222           9          8.2         121.6       1.0X
-day of timestamp wholestage on                     1246           1256          14          8.0         124.6       1.0X
+day of timestamp wholestage off                    1224           1227           4          8.2         122.4       1.0X
+day of timestamp wholestage on                     1219           1238          15          8.2         121.9       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 dayofyear of timestamp:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-dayofyear of timestamp wholestage off              1278           1286          12          7.8         127.8       1.0X
-dayofyear of timestamp wholestage on               1283           1291           8          7.8         128.3       1.0X
+dayofyear of timestamp wholestage off              1283           1283           1          7.8         128.3       1.0X
+dayofyear of timestamp wholestage on               1256           1261           5          8.0         125.6       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 dayofmonth of timestamp:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-dayofmonth of timestamp wholestage off             1220           1226           9          8.2         122.0       1.0X
-dayofmonth of timestamp wholestage on              1232           1249          15          8.1         123.2       1.0X
+dayofmonth of timestamp wholestage off             1227           1233           8          8.2         122.7       1.0X
+dayofmonth of timestamp wholestage on              1220           1228           6          8.2         122.0       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 dayofweek of timestamp:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-dayofweek of timestamp wholestage off              1409           1423          21          7.1         140.9       1.0X
-dayofweek of timestamp wholestage on               1396           1403           7          7.2         139.6       1.0X
+dayofweek of timestamp wholestage off              1404           1408           5          7.1         140.4       1.0X
+dayofweek of timestamp wholestage on               1376           1386           6          7.3         137.6       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 weekday of timestamp:                     Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-weekday of timestamp wholestage off                1346           1362          22          7.4         134.6       1.0X
-weekday of timestamp wholestage on                 1330           1341          11          7.5         133.0       1.0X
+weekday of timestamp wholestage off                1346           1350           5          7.4         134.6       1.0X
+weekday of timestamp wholestage on                 1313           1319           6          7.6         131.3       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 hour of timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-hour of timestamp wholestage off                    962            963           2         10.4          96.2       1.0X
-hour of timestamp wholestage on                     981            999          19         10.2          98.1       1.0X
+hour of timestamp wholestage off                   1005           1011           8         10.0         100.5       1.0X
+hour of timestamp wholestage on                     953            961           9         10.5          95.3       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 minute of timestamp:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-minute of timestamp wholestage off                  996            999           5         10.0          99.6       1.0X
-minute of timestamp wholestage on                   975            984          11         10.3          97.5       1.0X
+minute of timestamp wholestage off                  995           1000           8         10.1          99.5       1.0X
+minute of timestamp wholestage on                   957            959           3         10.5          95.7       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 second of timestamp:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-second of timestamp wholestage off                 1004           1005           2         10.0         100.4       1.0X
-second of timestamp wholestage on                   979            988           6         10.2          97.9       1.0X
+second of timestamp wholestage off                  960            963           4         10.4          96.0       1.0X
+second of timestamp wholestage on                   957            960           3         10.4          95.7       1.0X
 
 
 ================================================================================================
@@ -102,15 +102,15 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 current_date:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-current_date wholestage off                         285            289           6         35.1          28.5       1.0X
-current_date wholestage on                          302            308           8         33.1          30.2       0.9X
+current_date wholestage off                         290            295           7         34.4          29.0       1.0X
+current_date wholestage on                          287            295          13         34.9          28.7       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 current_timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-current_timestamp wholestage off                    296            298           2         33.8          29.6       1.0X
-current_timestamp wholestage on                     303            311           7         33.0          30.3       1.0X
+current_timestamp wholestage off                    294            296           4         34.1          29.4       1.0X
+current_timestamp wholestage on                     280            303          19         35.7          28.0       1.0X
 
 
 ================================================================================================
@@ -121,43 +121,43 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 cast to date:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-cast to date wholestage off                        1041           1042           1          9.6         104.1       1.0X
-cast to date wholestage on                         1027           1039           9          9.7         102.7       1.0X
+cast to date wholestage off                        1066           1067           1          9.4         106.6       1.0X
+cast to date wholestage on                         1007           1014           6          9.9         100.7       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 last_day:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-last_day wholestage off                            1250           1254           6          8.0         125.0       1.0X
-last_day wholestage on                             1267           1273           8          7.9         126.7       1.0X
+last_day wholestage off                            1273           1289          22          7.9         127.3       1.0X
+last_day wholestage on                             1238           1246           9          8.1         123.8       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 next_day:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-next_day wholestage off                            1118           1122           6          8.9         111.8       1.0X
-next_day wholestage on                             1081           1096          10          9.2         108.1       1.0X
+next_day wholestage off                            1124           1125           2          8.9         112.4       1.0X
+next_day wholestage on                             1058           1064           8          9.5         105.8       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_add:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_add wholestage off                            1053           1055           4          9.5         105.3       1.0X
-date_add wholestage on                             1059           1061           2          9.4         105.9       1.0X
+date_add wholestage off                            1049           1049           0          9.5         104.9       1.0X
+date_add wholestage on                             1036           1041           7          9.6         103.6       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_sub:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_sub wholestage off                            1055           1064          13          9.5         105.5       1.0X
-date_sub wholestage on                             1055           1060           6          9.5         105.5       1.0X
+date_sub wholestage off                            1051           1052           2          9.5         105.1       1.0X
+date_sub wholestage on                             1040           1046           5          9.6         104.0       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 add_months:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-add_months wholestage off                          1373           1375           2          7.3         137.3       1.0X
-add_months wholestage on                           1383           1393          13          7.2         138.3       1.0X
+add_months wholestage off                          1381           1388          11          7.2         138.1       1.0X
+add_months wholestage on                           1359           1367           8          7.4         135.9       1.0X
 
 
 ================================================================================================
@@ -168,8 +168,8 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 format date:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-format date wholestage off                         5590           5603          19          1.8         559.0       1.0X
-format date wholestage on                          5974           5985           8          1.7         597.4       0.9X
+format date wholestage off                         5766           5793          38          1.7         576.6       1.0X
+format date wholestage on                          5803           5812           7          1.7         580.3       1.0X
 
 
 ================================================================================================
@@ -180,8 +180,8 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 from_unixtime:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-from_unixtime wholestage off                       8650           8662          18          1.2         865.0       1.0X
-from_unixtime wholestage on                        8671           8685          15          1.2         867.1       1.0X
+from_unixtime wholestage off                       8891           8915          34          1.1         889.1       1.0X
+from_unixtime wholestage on                        8870           8885          12          1.1         887.0       1.0X
 
 
 ================================================================================================
@@ -192,15 +192,15 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 from_utc_timestamp:                       Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-from_utc_timestamp wholestage off                  1152           1157           7          8.7         115.2       1.0X
-from_utc_timestamp wholestage on                   1193           1200           7          8.4         119.3       1.0X
+from_utc_timestamp wholestage off                  1089           1094           7          9.2         108.9       1.0X
+from_utc_timestamp wholestage on                   1105           1107           3          9.0         110.5       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to_utc_timestamp:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to_utc_timestamp wholestage off                    1414           1417           3          7.1         141.4       1.0X
-to_utc_timestamp wholestage on                     1390           1397           7          7.2         139.0       1.0X
+to_utc_timestamp wholestage off                    1620           1628          11          6.2         162.0       1.0X
+to_utc_timestamp wholestage on                     1600           1608           7          6.3         160.0       1.0X
 
 
 ================================================================================================
@@ -211,29 +211,29 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 cast interval:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-cast interval wholestage off                        332            350          25         30.1          33.2       1.0X
-cast interval wholestage on                         325            333           7         30.8          32.5       1.0X
+cast interval wholestage off                        334            336           3         30.0          33.4       1.0X
+cast interval wholestage on                         305            310           4         32.7          30.5       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 datediff:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-datediff wholestage off                            1814           1819           7          5.5         181.4       1.0X
-datediff wholestage on                             1811           1822           9          5.5         181.1       1.0X
+datediff wholestage off                            1811           1816           7          5.5         181.1       1.0X
+datediff wholestage on                             1758           1761           3          5.7         175.8       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 months_between:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-months_between wholestage off                      4660           4661           1          2.1         466.0       1.0X
-months_between wholestage on                       4577           4586           5          2.2         457.7       1.0X
+months_between wholestage off                      4780           4789          12          2.1         478.0       1.0X
+months_between wholestage on                       4765           4772           8          2.1         476.5       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 window:                                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-window wholestage off                              2006           2119         161          0.5        2005.6       1.0X
-window wholestage on                              43855          43884          41          0.0       43855.4       0.0X
+window wholestage off                              1840           1967         179          0.5        1840.4       1.0X
+window wholestage on                              46710          46792          57          0.0       46709.5       0.0X
 
 
 ================================================================================================
@@ -244,134 +244,134 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc YEAR:                          Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc YEAR wholestage off                     2336           2339           5          4.3         233.6       1.0X
-date_trunc YEAR wholestage on                      2204           2211           6          4.5         220.4       1.1X
+date_trunc YEAR wholestage off                     2350           2351           1          4.3         235.0       1.0X
+date_trunc YEAR wholestage on                      2317           2324           8          4.3         231.7       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc YYYY:                          Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc YYYY wholestage off                     2338           2339           1          4.3         233.8       1.0X
-date_trunc YYYY wholestage on                      2200           2208           5          4.5         220.0       1.1X
+date_trunc YYYY wholestage off                     2341           2343           3          4.3         234.1       1.0X
+date_trunc YYYY wholestage on                      2314           2332          22          4.3         231.4       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc YY:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc YY wholestage off                       2337           2340           5          4.3         233.7       1.0X
-date_trunc YY wholestage on                        2202           2209           6          4.5         220.2       1.1X
+date_trunc YY wholestage off                       2348           2354           9          4.3         234.8       1.0X
+date_trunc YY wholestage on                        2313           2317           3          4.3         231.3       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc MON:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc MON wholestage off                      2238           2239           1          4.5         223.8       1.0X
-date_trunc MON wholestage on                       2222           2233          11          4.5         222.2       1.0X
+date_trunc MON wholestage off                      2383           2385           3          4.2         238.3       1.0X
+date_trunc MON wholestage on                       2293           2307          22          4.4         229.3       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc MONTH:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc MONTH wholestage off                    2243           2243           1          4.5         224.3       1.0X
-date_trunc MONTH wholestage on                     2216           2224           9          4.5         221.6       1.0X
+date_trunc MONTH wholestage off                    2380           2393          18          4.2         238.0       1.0X
+date_trunc MONTH wholestage on                     2296           2304           9          4.4         229.6       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc MM:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc MM wholestage off                       2237           2239           3          4.5         223.7       1.0X
-date_trunc MM wholestage on                        2217           2221           3          4.5         221.7       1.0X
+date_trunc MM wholestage off                       2375           2380           7          4.2         237.5       1.0X
+date_trunc MM wholestage on                        2295           2302           8          4.4         229.5       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc DAY:                           Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc DAY wholestage off                      1894           1896           3          5.3         189.4       1.0X
-date_trunc DAY wholestage on                       1851           1856           5          5.4         185.1       1.0X
+date_trunc DAY wholestage off                      2145           2145           1          4.7         214.5       1.0X
+date_trunc DAY wholestage on                       2090           2096           6          4.8         209.0       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc DD:                            Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc DD wholestage off                       1887           1899          17          5.3         188.7       1.0X
-date_trunc DD wholestage on                        1846           1855           6          5.4         184.6       1.0X
+date_trunc DD wholestage off                       2142           2149          11          4.7         214.2       1.0X
+date_trunc DD wholestage on                        2090           2096           5          4.8         209.0       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc HOUR:                          Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc HOUR wholestage off                     1947           1951           5          5.1         194.7       1.0X
-date_trunc HOUR wholestage on                      1909           1918           7          5.2         190.9       1.0X
+date_trunc HOUR wholestage off                     2204           2212          11          4.5         220.4       1.0X
+date_trunc HOUR wholestage on                      2196           2201           5          4.6         219.6       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc MINUTE:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc MINUTE wholestage off                    381            386           7         26.3          38.1       1.0X
-date_trunc MINUTE wholestage on                     321            323           1         31.2          32.1       1.2X
+date_trunc MINUTE wholestage off                    353            353           1         28.3          35.3       1.0X
+date_trunc MINUTE wholestage on                     331            335           4         30.2          33.1       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc SECOND:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc SECOND wholestage off                    368            368           0         27.2          36.8       1.0X
-date_trunc SECOND wholestage on                     324            327           3         30.9          32.4       1.1X
+date_trunc SECOND wholestage off                    343            345           3         29.2          34.3       1.0X
+date_trunc SECOND wholestage on                     335            336           2         29.9          33.5       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc WEEK:                          Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc WEEK wholestage off                     2213           2213           0          4.5         221.3       1.0X
-date_trunc WEEK wholestage on                      2113           2123          11          4.7         211.3       1.0X
+date_trunc WEEK wholestage off                     2277           2279           3          4.4         227.7       1.0X
+date_trunc WEEK wholestage on                      2262           2270          10          4.4         226.2       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 date_trunc QUARTER:                       Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-date_trunc QUARTER wholestage off                  3071           3081          14          3.3         307.1       1.0X
-date_trunc QUARTER wholestage on                   3031           3035           3          3.3         303.1       1.0X
+date_trunc QUARTER wholestage off                  3395           3395           0          2.9         339.5       1.0X
+date_trunc QUARTER wholestage on                   3185           3193           6          3.1         318.5       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc year:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc year wholestage off                           326            328           3         30.7          32.6       1.0X
-trunc year wholestage on                            307            318          12         32.6          30.7       1.1X
+trunc year wholestage off                           321            330          14         31.2          32.1       1.0X
+trunc year wholestage on                            293            308          14         34.1          29.3       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc yyyy:                               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc yyyy wholestage off                           327            333           7         30.5          32.7       1.0X
-trunc yyyy wholestage on                            305            320          17         32.8          30.5       1.1X
+trunc yyyy wholestage off                           322            324           2         31.1          32.2       1.0X
+trunc yyyy wholestage on                            293            296           4         34.1          29.3       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc yy:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc yy wholestage off                             322            323           1         31.1          32.2       1.0X
-trunc yy wholestage on                              304            343          67         32.9          30.4       1.1X
+trunc yy wholestage off                             322            322           0         31.0          32.2       1.0X
+trunc yy wholestage on                              292            296           4         34.2          29.2       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc mon:                                Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc mon wholestage off                            321            321           1         31.2          32.1       1.0X
-trunc mon wholestage on                             303            313           9         33.0          30.3       1.1X
+trunc mon wholestage off                            319            320           1         31.3          31.9       1.0X
+trunc mon wholestage on                             293            295           1         34.1          29.3       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc month:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc month wholestage off                          319            323           4         31.3          31.9       1.0X
-trunc month wholestage on                           305            359          75         32.8          30.5       1.0X
+trunc month wholestage off                          319            320           1         31.3          31.9       1.0X
+trunc month wholestage on                           293            295           2         34.1          29.3       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 trunc mm:                                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-trunc mm wholestage off                             322            323           1         31.0          32.2       1.0X
-trunc mm wholestage on                              317            351          53         31.5          31.7       1.0X
+trunc mm wholestage off                             318            319           1         31.4          31.8       1.0X
+trunc mm wholestage on                              293            312          26         34.1          29.3       1.1X
 
 
 ================================================================================================
@@ -382,36 +382,36 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to timestamp str:                         Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to timestamp str wholestage off                     219            219           0          4.6         219.4       1.0X
-to timestamp str wholestage on                      214            216           2          4.7         214.0       1.0X
+to timestamp str wholestage off                     220            226           9          4.5         220.3       1.0X
+to timestamp str wholestage on                      212            214           4          4.7         212.2       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to_timestamp:                             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to_timestamp wholestage off                        1947           1951           6          0.5        1946.8       1.0X
-to_timestamp wholestage on                         1950           1958          12          0.5        1949.6       1.0X
+to_timestamp wholestage off                        1875           1876           2          0.5        1874.7       1.0X
+to_timestamp wholestage on                         2075           2091          25          0.5        2075.1       0.9X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to_unix_timestamp:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to_unix_timestamp wholestage off                   1975           1979           5          0.5        1974.8       1.0X
-to_unix_timestamp wholestage on                    1895           1908          12          0.5        1895.3       1.0X
+to_unix_timestamp wholestage off                   2141           2143           2          0.5        2141.2       1.0X
+to_unix_timestamp wholestage on                    2145           2177          21          0.5        2144.7       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to date str:                              Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to date str wholestage off                          284            286           2          3.5         284.3       1.0X
-to date str wholestage on                           263            266           4          3.8         263.3       1.1X
+to date str wholestage off                          276            284          11          3.6         276.1       1.0X
+to date str wholestage on                           264            270           8          3.8         264.3       1.0X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 to_date:                                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-to_date wholestage off                             3460           3485          36          0.3        3459.8       1.0X
-to_date wholestage on                              3413           3431          25          0.3        3413.0       1.0X
+to_date wholestage off                             3876           3903          38          0.3        3876.1       1.0X
+to_date wholestage on                              3833           3843           6          0.3        3833.4       1.0X
 
 
 ================================================================================================
@@ -422,8 +422,8 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 To/from java.sql.Timestamp:               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-From java.sql.Timestamp                            2032           2038           6          2.5         406.5       1.0X
-Collect longs                                      1276           1597         419          3.9         255.1       1.6X
-Collect timestamps                                 6254           7606        1172          0.8        1250.7       0.3X
+From java.sql.Timestamp                             394            399           5         12.7          78.7       1.0X
+Collect longs                                      1336           2676        1201          3.7         267.2       0.3X
+Collect timestamps                                 2025           2091          65          2.5         405.0       0.2X
 
 
diff --git a/sql/core/benchmarks/DateTimeRebaseBenchmark-jdk11-results.txt b/sql/core/benchmarks/DateTimeRebaseBenchmark-jdk11-results.txt
index edf9eef..2a9322a 100644
--- a/sql/core/benchmarks/DateTimeRebaseBenchmark-jdk11-results.txt
+++ b/sql/core/benchmarks/DateTimeRebaseBenchmark-jdk11-results.txt
@@ -6,49 +6,49 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Save dates to parquet:                    Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, noop                                  19946          19946           0          5.0         199.5       1.0X
-before 1582, noop                                 10910          10910           0          9.2         109.1       1.8X
-after 1582, rebase off                            32065          32065           0          3.1         320.7       0.6X
-after 1582, rebase on                             31424          31424           0          3.2         314.2       0.6X
-before 1582, rebase off                           21764          21764           0          4.6         217.6       0.9X
-before 1582, rebase on                            22700          22700           0          4.4         227.0       0.9X
+after 1582, noop                                  21171          21171           0          4.7         211.7       1.0X
+before 1582, noop                                 11036          11036           0          9.1         110.4       1.9X
+after 1582, rebase off                            34321          34321           0          2.9         343.2       0.6X
+after 1582, rebase on                             33269          33269           0          3.0         332.7       0.6X
+before 1582, rebase off                           22016          22016           0          4.5         220.2       1.0X
+before 1582, rebase on                            23338          23338           0          4.3         233.4       0.9X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Load dates from parquet:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, vec off, rebase off                   13054          13273         193          7.7         130.5       1.0X
-after 1582, vec off, rebase on                    13337          13418         117          7.5         133.4       1.0X
-after 1582, vec on, rebase off                     3666           3740         116         27.3          36.7       3.6X
-after 1582, vec on, rebase on                      5097           5160          70         19.6          51.0       2.6X
-before 1582, vec off, rebase off                  12908          12984          76          7.7         129.1       1.0X
-before 1582, vec off, rebase on                   14514          14575          53          6.9         145.1       0.9X
-before 1582, vec on, rebase off                    3718           3790          63         26.9          37.2       3.5X
-before 1582, vec on, rebase on                     5472           5527          48         18.3          54.7       2.4X
+after 1582, vec off, rebase off                   12791          13089         287          7.8         127.9       1.0X
+after 1582, vec off, rebase on                    13203          13271          81          7.6         132.0       1.0X
+after 1582, vec on, rebase off                     3709           3764          49         27.0          37.1       3.4X
+after 1582, vec on, rebase on                      5082           5114          29         19.7          50.8       2.5X
+before 1582, vec off, rebase off                  13059          13153          87          7.7         130.6       1.0X
+before 1582, vec off, rebase on                   14211          14236          27          7.0         142.1       0.9X
+before 1582, vec on, rebase off                    3687           3749          72         27.1          36.9       3.5X
+before 1582, vec on, rebase on                     5449           5497          56         18.4          54.5       2.3X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Save timestamps to parquet:               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, noop                                   2718           2718           0         36.8          27.2       1.0X
-before 1582, noop                                  2774           2774           0         36.0          27.7       1.0X
-after 1582, rebase off                            16515          16515           0          6.1         165.2       0.2X
-after 1582, rebase on                             18619          18619           0          5.4         186.2       0.1X
-before 1582, rebase off                           16382          16382           0          6.1         163.8       0.2X
-before 1582, rebase on                            19580          19580           0          5.1         195.8       0.1X
+after 1582, noop                                   2831           2831           0         35.3          28.3       1.0X
+before 1582, noop                                  2816           2816           0         35.5          28.2       1.0X
+after 1582, rebase off                            15543          15543           0          6.4         155.4       0.2X
+after 1582, rebase on                             18391          18391           0          5.4         183.9       0.2X
+before 1582, rebase off                           15747          15747           0          6.4         157.5       0.2X
+before 1582, rebase on                            18846          18846           0          5.3         188.5       0.2X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Load timestamps from parquet:             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, vec off, rebase off                   15082          15112          43          6.6         150.8       1.0X
-after 1582, vec off, rebase on                    18035          18105         107          5.5         180.3       0.8X
-after 1582, vec on, rebase off                     4948           4970          19         20.2          49.5       3.0X
-after 1582, vec on, rebase on                      8761           8780          25         11.4          87.6       1.7X
-before 1582, vec off, rebase off                  15285          15389         103          6.5         152.8       1.0X
-before 1582, vec off, rebase on                   18277          18368          80          5.5         182.8       0.8X
-before 1582, vec on, rebase off                    4938           4954          15         20.3          49.4       3.1X
-before 1582, vec on, rebase on                     9220           9248          33         10.8          92.2       1.6X
+after 1582, vec off, rebase off                   16126          16216          78          6.2         161.3       1.0X
+after 1582, vec off, rebase on                    18277          18453         165          5.5         182.8       0.9X
+after 1582, vec on, rebase off                     5030           5067          42         19.9          50.3       3.2X
+after 1582, vec on, rebase on                      8553           8583          43         11.7          85.5       1.9X
+before 1582, vec off, rebase off                  15828          15872          39          6.3         158.3       1.0X
+before 1582, vec off, rebase on                   18899          18959         103          5.3         189.0       0.9X
+before 1582, vec on, rebase off                    4961           5009          43         20.2          49.6       3.3X
+before 1582, vec on, rebase on                     9099           9140          40         11.0          91.0       1.8X
 
 
 ================================================================================================
@@ -59,36 +59,36 @@ OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Save dates to ORC:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, noop                                  19820          19820           0          5.0         198.2       1.0X
-before 1582, noop                                 10825          10825           0          9.2         108.2       1.8X
-after 1582                                        27705          27705           0          3.6         277.1       0.7X
-before 1582                                       19390          19390           0          5.2         193.9       1.0X
+after 1582, noop                                  21026          21026           0          4.8         210.3       1.0X
+before 1582, noop                                 11040          11040           0          9.1         110.4       1.9X
+after 1582                                        28171          28171           0          3.5         281.7       0.7X
+before 1582                                       18955          18955           0          5.3         189.5       1.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Load dates from ORC:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, vec off                               10401          10426          33          9.6         104.0       1.0X
-after 1582, vec on                                 3788           3813          29         26.4          37.9       2.7X
-before 1582, vec off                              10832          10843          11          9.2         108.3       1.0X
-before 1582, vec on                                4182           4219          46         23.9          41.8       2.5X
+after 1582, vec off                               10876          10931          49          9.2         108.8       1.0X
+after 1582, vec on                                 3900           3913          20         25.6          39.0       2.8X
+before 1582, vec off                              11165          11174          12          9.0         111.6       1.0X
+before 1582, vec on                                4208           4214           7         23.8          42.1       2.6X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Save timestamps to ORC:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, noop                                   2787           2787           0         35.9          27.9       1.0X
-before 1582, noop                                  2777           2777           0         36.0          27.8       1.0X
-after 1582                                        52456          52456           0          1.9         524.6       0.1X
-before 1582                                       54983          54983           0          1.8         549.8       0.1X
+after 1582, noop                                   2924           2924           0         34.2          29.2       1.0X
+before 1582, noop                                  2820           2820           0         35.5          28.2       1.0X
+after 1582                                        22228          22228           0          4.5         222.3       0.1X
+before 1582                                       22590          22590           0          4.4         225.9       0.1X
 
 OpenJDK 64-Bit Server VM 11.0.6+10-post-Ubuntu-1ubuntu118.04.1 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Load timestamps from ORC:                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, vec off                               38336          38425          88          2.6         383.4       1.0X
-after 1582, vec on                                30089          30198          96          3.3         300.9       1.3X
-before 1582, vec off                              42739          42801          87          2.3         427.4       0.9X
-before 1582, vec on                               31530          31591          61          3.2         315.3       1.2X
+after 1582, vec off                               13591          13658          59          7.4         135.9       1.0X
+after 1582, vec on                                 7399           7488         126         13.5          74.0       1.8X
+before 1582, vec off                              14065          14096          30          7.1         140.7       1.0X
+before 1582, vec on                                7950           8127         249         12.6          79.5       1.7X
 
 
diff --git a/sql/core/benchmarks/DateTimeRebaseBenchmark-results.txt b/sql/core/benchmarks/DateTimeRebaseBenchmark-results.txt
index 602f3e9..0509505 100644
--- a/sql/core/benchmarks/DateTimeRebaseBenchmark-results.txt
+++ b/sql/core/benchmarks/DateTimeRebaseBenchmark-results.txt
@@ -6,49 +6,49 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Save dates to parquet:                    Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, noop                                  23453          23453           0          4.3         234.5       1.0X
-before 1582, noop                                 10821          10821           0          9.2         108.2       2.2X
-after 1582, rebase off                            35558          35558           0          2.8         355.6       0.7X
-after 1582, rebase on                             35892          35892           0          2.8         358.9       0.7X
-before 1582, rebase off                           22700          22700           0          4.4         227.0       1.0X
-before 1582, rebase on                            23247          23247           0          4.3         232.5       1.0X
+after 1582, noop                                  24114          24114           0          4.1         241.1       1.0X
+before 1582, noop                                 10250          10250           0          9.8         102.5       2.4X
+after 1582, rebase off                            36672          36672           0          2.7         366.7       0.7X
+after 1582, rebase on                             37123          37123           0          2.7         371.2       0.6X
+before 1582, rebase off                           21925          21925           0          4.6         219.2       1.1X
+before 1582, rebase on                            22341          22341           0          4.5         223.4       1.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Load dates from parquet:                  Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, vec off, rebase off                   12641          12690          43          7.9         126.4       1.0X
-after 1582, vec off, rebase on                    13318          13380          67          7.5         133.2       0.9X
-after 1582, vec on, rebase off                     3648           3659          11         27.4          36.5       3.5X
-after 1582, vec on, rebase on                      5160           5212          69         19.4          51.6       2.4X
-before 1582, vec off, rebase off                  13024          13065          36          7.7         130.2       1.0X
-before 1582, vec off, rebase on                   13810          13932         106          7.2         138.1       0.9X
-before 1582, vec on, rebase off                    3631           3695          57         27.5          36.3       3.5X
-before 1582, vec on, rebase on                     5791           5860          71         17.3          57.9       2.2X
+after 1582, vec off, rebase off                   12456          12601         126          8.0         124.6       1.0X
+after 1582, vec off, rebase on                    13299          13336          32          7.5         133.0       0.9X
+after 1582, vec on, rebase off                     3623           3660          40         27.6          36.2       3.4X
+after 1582, vec on, rebase on                      5160           5177          15         19.4          51.6       2.4X
+before 1582, vec off, rebase off                  13177          13264          76          7.6         131.8       0.9X
+before 1582, vec off, rebase on                   14102          14149          46          7.1         141.0       0.9X
+before 1582, vec on, rebase off                    3649           3670          34         27.4          36.5       3.4X
+before 1582, vec on, rebase on                     5652           5667          15         17.7          56.5       2.2X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Save timestamps to parquet:               Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, noop                                   2750           2750           0         36.4          27.5       1.0X
-before 1582, noop                                  2833           2833           0         35.3          28.3       1.0X
-after 1582, rebase off                            16832          16832           0          5.9         168.3       0.2X
-after 1582, rebase on                             19688          19688           0          5.1         196.9       0.1X
-before 1582, rebase off                           17548          17548           0          5.7         175.5       0.2X
-before 1582, rebase on                            21343          21343           0          4.7         213.4       0.1X
+after 1582, noop                                   2871           2871           0         34.8          28.7       1.0X
+before 1582, noop                                  2753           2753           0         36.3          27.5       1.0X
+after 1582, rebase off                            15927          15927           0          6.3         159.3       0.2X
+after 1582, rebase on                             19138          19138           0          5.2         191.4       0.1X
+before 1582, rebase off                           16137          16137           0          6.2         161.4       0.2X
+before 1582, rebase on                            19584          19584           0          5.1         195.8       0.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Load timestamps from parquet:             Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, vec off, rebase off                   15243          15329          82          6.6         152.4       1.0X
-after 1582, vec off, rebase on                    18296          18330          54          5.5         183.0       0.8X
-after 1582, vec on, rebase off                     4925           4927           2         20.3          49.2       3.1X
-after 1582, vec on, rebase on                      9647           9686          35         10.4          96.5       1.6X
-before 1582, vec off, rebase off                  14880          15105         267          6.7         148.8       1.0X
-before 1582, vec off, rebase on                   18474          18514          51          5.4         184.7       0.8X
-before 1582, vec on, rebase off                    4970           4978          10         20.1          49.7       3.1X
-before 1582, vec on, rebase on                     9938          10012          64         10.1          99.4       1.5X
+after 1582, vec off, rebase off                   14995          15047          47          6.7         150.0       1.0X
+after 1582, vec off, rebase on                    18111          18146          37          5.5         181.1       0.8X
+after 1582, vec on, rebase off                     4837           4873          44         20.7          48.4       3.1X
+after 1582, vec on, rebase on                      9542           9669         111         10.5          95.4       1.6X
+before 1582, vec off, rebase off                  14993          15090          94          6.7         149.9       1.0X
+before 1582, vec off, rebase on                   18675          18712          64          5.4         186.7       0.8X
+before 1582, vec on, rebase off                    4908           4923          15         20.4          49.1       3.1X
+before 1582, vec on, rebase on                    10128          10148          19          9.9         101.3       1.5X
 
 
 ================================================================================================
@@ -59,36 +59,36 @@ OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Save dates to ORC:                        Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, noop                                  23500          23500           0          4.3         235.0       1.0X
-before 1582, noop                                 10788          10788           0          9.3         107.9       2.2X
-after 1582                                        32237          32237           0          3.1         322.4       0.7X
-before 1582                                       20187          20187           0          5.0         201.9       1.2X
+after 1582, noop                                  23977          23977           0          4.2         239.8       1.0X
+before 1582, noop                                 10094          10094           0          9.9         100.9       2.4X
+after 1582                                        33115          33115           0          3.0         331.2       0.7X
+before 1582                                       19430          19430           0          5.1         194.3       1.2X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Load dates from ORC:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, vec off                               10947          10971          28          9.1         109.5       1.0X
-after 1582, vec on                                 3677           3702          36         27.2          36.8       3.0X
-before 1582, vec off                              11456          11472          21          8.7         114.6       1.0X
-before 1582, vec on                                4079           4103          21         24.5          40.8       2.7X
+after 1582, vec off                               10217          10241          21          9.8         102.2       1.0X
+after 1582, vec on                                 3671           3691          31         27.2          36.7       2.8X
+before 1582, vec off                              10800          10874         114          9.3         108.0       0.9X
+before 1582, vec on                                4118           4165          74         24.3          41.2       2.5X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Save timestamps to ORC:                   Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, noop                                   2891           2891           0         34.6          28.9       1.0X
-before 1582, noop                                  2906           2906           0         34.4          29.1       1.0X
-after 1582                                        55812          55812           0          1.8         558.1       0.1X
-before 1582                                       57512          57512           0          1.7         575.1       0.1X
+after 1582, noop                                   2691           2691           0         37.2          26.9       1.0X
+before 1582, noop                                  2743           2743           0         36.5          27.4       1.0X
+after 1582                                        21409          21409           0          4.7         214.1       0.1X
+before 1582                                       22554          22554           0          4.4         225.5       0.1X
 
 OpenJDK 64-Bit Server VM 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08 on Linux 4.15.0-1063-aws
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 Load timestamps from ORC:                 Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
 ------------------------------------------------------------------------------------------------------------------------
-after 1582, vec off                               46376          46410          33          2.2         463.8       1.0X
-after 1582, vec on                                35003          35189         163          2.9         350.0       1.3X
-before 1582, vec off                              52942          52979          34          1.9         529.4       0.9X
-before 1582, vec on                               42596          42747         158          2.3         426.0       1.1X
+after 1582, vec off                               14752          14855         103          6.8         147.5       1.0X
+after 1582, vec on                                 8146           8185          34         12.3          81.5       1.8X
+before 1582, vec off                              15247          15294          46          6.6         152.5       1.0X
+before 1582, vec on                                8414           8466          52         11.9          84.1       1.8X
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org