You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/04 10:02:49 UTC

[GitHub] [spark] yaooqinn opened a new pull request #28727: [SPARK-31879][SQL] Preset monday start(iso) for the first day of week by reflection

yaooqinn opened a new pull request #28727:
URL: https://github.com/apache/spark/pull/28727


    # What changes were proposed in this pull request?
   
   
   This PR set a cache entry for the key[fisrtdayofweek + minimal] (Sunday +1) 
   
   
   ### Why are the changes needed?
   
   #### cases
   ```sql
   spark-sql> select to_timestamp('2020-1-1', 'YYYY-w-u');
   2019-12-29 00:00:00
   spark-sql> set spark.sql.legacy.timeParserPolicy=legacy;
   spark.sql.legacy.timeParserPolicy	legacy
   spark-sql> select to_timestamp('2020-1-1', 'YYYY-w-u');
   2019-12-30 00:00:00
   ```
   
   #### reasons
   
   These week-based fields need Locale to express their semantics, the first day of the week varies from country to country.
   
   From the Java doc of WeekFields
   ```java
       /**
        * Gets the first day-of-week.
        * <p>
        * The first day-of-week varies by culture.
        * For example, the US uses Sunday, while France and the ISO-8601 standard use Monday.
        * This method returns the first day using the standard {@code DayOfWeek} enum.
        *
        * @return the first day-of-week, not null
        */
       public DayOfWeek getFirstDayOfWeek() {
           return firstDayOfWeek;
       }
   ```
   
   But for the SimpleDateFormat, the day-of-week is not localized
   
   ```
   u	Day number of week (1 = Monday, ..., 7 = Sunday)	Number	1
   ```
   
   Currently, the default locale we use is the US, so the result moved a day backward.
   
   For other countries, please refer to [First Day of the Week in Different Countries](http://chartsbin.com/view/41671)
   
   With this change, it restores the first day of week calculating for functions when using the default locale.
   
   ### Does this PR introduce _any_ user-facing change?
   
   
   Yes, but the behavior change is used to restore the old one of v2.4
   
   
   ### How was this patch tested?
   
   add unit tests
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638820559






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638883167






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638753726


   **[Test build #123528 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123528/testReport)** for PR 28727 at commit [`0c3207c`](https://github.com/apache/spark/commit/0c3207c57771a800ef0b018e827dd07f4ccf4acd).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] yaooqinn closed pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
yaooqinn closed pull request #28727:
URL: https://github.com/apache/spark/pull/28727


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638820559






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638978237


   **[Test build #123533 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123533/testReport)** for PR 28727 at commit [`590b40a`](https://github.com/apache/spark/commit/590b40af70bebfe9176d37d6ebd0ad71ecbff9e7).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638881794


   **[Test build #123528 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123528/testReport)** for PR 28727 at commit [`0c3207c`](https://github.com/apache/spark/commit/0c3207c57771a800ef0b018e827dd07f4ccf4acd).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638979325






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] srowen commented on a change in pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
srowen commented on a change in pull request #28727:
URL: https://github.com/apache/spark/pull/28727#discussion_r435222713



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -155,7 +157,22 @@ trait DateTimeFormatterHelper {
   }
 }
 
-private object DateTimeFormatterHelper {
+private[spark] object DateTimeFormatterHelper {
+  val defaultLocale = Locale.US
+
+  def presetSundayStartToMondayStart(): Unit = {
+    val CACHE: Field = classOf[WeekFields].getDeclaredField("CACHE")

Review comment:
       Yikes, isn't this going to change the Locale's settings for the whole JVM?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638760446


   **[Test build #123529 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123529/testReport)** for PR 28727 at commit [`0c3207c`](https://github.com/apache/spark/commit/0c3207c57771a800ef0b018e827dd07f4ccf4acd).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] yaooqinn commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638758746


   retest this please


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638761044






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638894124






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638894124






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638820055


   **[Test build #123533 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123533/testReport)** for PR 28727 at commit [`590b40a`](https://github.com/apache/spark/commit/590b40af70bebfe9176d37d6ebd0ad71ecbff9e7).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638754334






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638760446


   **[Test build #123529 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123529/testReport)** for PR 28727 at commit [`0c3207c`](https://github.com/apache/spark/commit/0c3207c57771a800ef0b018e827dd07f4ccf4acd).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638979325






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #28727:
URL: https://github.com/apache/spark/pull/28727#discussion_r435202365



##########
File path: docs/sql-ref-datetime-pattern.md
##########
@@ -63,7 +63,10 @@ Spark uses pattern letters in the following table for date and timestamp parsing
 
 The count of pattern letters determines the format.
 
-- Text: The text style is determined based on the number of pattern letters used. Less than 4 pattern letters will use the short form. Exactly 4 pattern letters will use the full form. Exactly 5 pattern letters will use the narrow form. 5 or more letters will fail.
+- Text: The text style is determined based on the number of pattern letters used. Less than 4 pattern letters will use the short form. Exactly 4 pattern letters will use the full form. Exactly 5 pattern letters will use the narrow form. 5 or more letters will fail. More details for the text style:

Review comment:
       How about
   ```
   ... will use the short form (typically an abbreviation, for example, day-of-week Monday might output "Mon"). ...
   ```
   
   BTW we should remove `Exactly 5 pattern letters will use the narrow form`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638753726


   **[Test build #123528 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123528/testReport)** for PR 28727 at commit [`0c3207c`](https://github.com/apache/spark/commit/0c3207c57771a800ef0b018e827dd07f4ccf4acd).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638883167






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] yaooqinn commented on a change in pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #28727:
URL: https://github.com/apache/spark/pull/28727#discussion_r435233117



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -155,7 +157,22 @@ trait DateTimeFormatterHelper {
   }
 }
 
-private object DateTimeFormatterHelper {
+private[spark] object DateTimeFormatterHelper {
+  val defaultLocale = Locale.US
+
+  def presetSundayStartToMondayStart(): Unit = {
+    val CACHE: Field = classOf[WeekFields].getDeclaredField("CACHE")

Review comment:
       Only for those trying to use the original value of `SUNDAY FISRT and 1 mininalDay`. This seems not to be a good way though.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638892230


   **[Test build #123529 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123529/testReport)** for PR 28727 at commit [`0c3207c`](https://github.com/apache/spark/commit/0c3207c57771a800ef0b018e827dd07f4ccf4acd).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638754334






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] yaooqinn commented on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638763280


   cc @cloud-fan @xuanyuanking  @MaxGekk @srowen


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638761044






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #28727:
URL: https://github.com/apache/spark/pull/28727#discussion_r435255327



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeFormatterHelper.scala
##########
@@ -155,7 +157,22 @@ trait DateTimeFormatterHelper {
   }
 }
 
-private object DateTimeFormatterHelper {
+private[spark] object DateTimeFormatterHelper {
+  val defaultLocale = Locale.US
+
+  def presetSundayStartToMondayStart(): Unit = {
+    val CACHE: Field = classOf[WeekFields].getDeclaredField("CACHE")

Review comment:
       yea, we shouldn't change a global cache, which is shared in the entire JVM, including user code.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #28727: [SPARK-31879][SQL][test-java11] Preset monday start(iso) for the first day of week by reflection

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28727:
URL: https://github.com/apache/spark/pull/28727#issuecomment-638820055


   **[Test build #123533 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/123533/testReport)** for PR 28727 at commit [`590b40a`](https://github.com/apache/spark/commit/590b40af70bebfe9176d37d6ebd0ad71ecbff9e7).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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