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/07/06 06:32:20 UTC

[GitHub] [spark] Sudhar287 opened a new pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

Sudhar287 opened a new pull request #29008:
URL: https://github.com/apache/spark/pull/29008


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Replaced  floorDiv to just / in `localRebaseGregorianToJulianDays()` in `spark/sql/catalyst/util/RebaseDateTime.scala
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   More efficiency.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   NO
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   Proof of concept [here](https://github.com/apache/spark/pull/28573/files).


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/RebaseDateTime.scala
##########
@@ -186,7 +186,7 @@ object RebaseDateTime {
       .setTimeZone(TimeZoneUTC)
       .setDate(localDate.getYear, localDate.getMonthValue - 1, localDate.getDayOfMonth)
       .build()
-    Math.toIntExact(Math.floorDiv(utcCal.getTimeInMillis, MILLIS_PER_DAY))
+    Math.toIntExact(utcCal.getTimeInMillis, MILLIS_PER_DAY)

Review comment:
       I guess I'd be surprised if the operations were meaningfully faster, given how much else is happening. I'm sure a microbenchmark of a trillion calls would show a difference, but that's not quite the use case.
   Nevertheless are there other instances where both args are definitely nonnegative?




----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Can one of the admins verify this patch?


----------------------------------------------------------------
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] MaxGekk commented on a change in pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/RebaseDateTime.scala
##########
@@ -186,7 +186,7 @@ object RebaseDateTime {
       .setTimeZone(TimeZoneUTC)
       .setDate(localDate.getYear, localDate.getMonthValue - 1, localDate.getDayOfMonth)
       .build()
-    Math.toIntExact(Math.floorDiv(utcCal.getTimeInMillis, MILLIS_PER_DAY))
+    Math.toIntExact(utcCal.getTimeInMillis, MILLIS_PER_DAY)

Review comment:
       Where is the division?




----------------------------------------------------------------
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] MaxGekk commented on a change in pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/RebaseDateTime.scala
##########
@@ -186,7 +186,7 @@ object RebaseDateTime {
       .setTimeZone(TimeZoneUTC)
       .setDate(localDate.getYear, localDate.getMonthValue - 1, localDate.getDayOfMonth)
       .build()
-    Math.toIntExact(Math.floorDiv(utcCal.getTimeInMillis, MILLIS_PER_DAY))
+    Math.toIntExact(utcCal.getTimeInMillis/MILLIS_PER_DAY)

Review comment:
       ```suggestion
       Math.toIntExact(utcCal.getTimeInMillis / MILLIS_PER_DAY)
   ```




----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/RebaseDateTime.scala
##########
@@ -186,7 +186,7 @@ object RebaseDateTime {
       .setTimeZone(TimeZoneUTC)
       .setDate(localDate.getYear, localDate.getMonthValue - 1, localDate.getDayOfMonth)
       .build()
-    Math.toIntExact(Math.floorDiv(utcCal.getTimeInMillis, MILLIS_PER_DAY))
+    Math.toIntExact(utcCal.getTimeInMillis, MILLIS_PER_DAY)

Review comment:
       Yes, the comma needs to become a slash. 
   I think this change would then be OK as the sign of these two args are always the same.
   However, does it make much difference? it's going to be a few extra math ops. It might be useful to just keep this consistent




----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/125977/
   Test FAILed.


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   **[Test build #126066 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126066/testReport)** for PR 29008 at commit [`02cfa89`](https://github.com/apache/spark/commit/02cfa895aee27c0ba9493a264647b0082680dc15).


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Can one of the admins verify this patch?


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Can one of the admins verify this patch?


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Can one of the admins verify this patch?


----------------------------------------------------------------
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 pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Merged to master


----------------------------------------------------------------
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 pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Jenkins 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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   **[Test build #126066 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126066/testReport)** for PR 29008 at commit [`02cfa89`](https://github.com/apache/spark/commit/02cfa895aee27c0ba9493a264647b0082680dc15).
    * 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] srowen commented on pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Jenkins 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 removed a comment on pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   **[Test build #125977 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125977/testReport)** for PR 29008 at commit [`02cfa89`](https://github.com/apache/spark/commit/02cfa895aee27c0ba9493a264647b0082680dc15).


----------------------------------------------------------------
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] Sudhar287 commented on a change in pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/RebaseDateTime.scala
##########
@@ -186,7 +186,7 @@ object RebaseDateTime {
       .setTimeZone(TimeZoneUTC)
       .setDate(localDate.getYear, localDate.getMonthValue - 1, localDate.getDayOfMonth)
       .build()
-    Math.toIntExact(Math.floorDiv(utcCal.getTimeInMillis, MILLIS_PER_DAY))
+    Math.toIntExact(utcCal.getTimeInMillis, MILLIS_PER_DAY)

Review comment:
       Oops Sorry, silly me. 
   And yes @srowen, this does make things faster. I can do some benchmarking if you would like me to...




----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   **[Test build #125894 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125894/testReport)** for PR 29008 at commit [`02cfa89`](https://github.com/apache/spark/commit/02cfa895aee27c0ba9493a264647b0082680dc15).


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   **[Test build #125977 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125977/testReport)** for PR 29008 at commit [`02cfa89`](https://github.com/apache/spark/commit/02cfa895aee27c0ba9493a264647b0082680dc15).
    * This patch **fails PySpark unit 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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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] Sudhar287 commented on pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Hmm, it says no failures [here](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125894/?auto_refresh=true). What am I suppose to do?


----------------------------------------------------------------
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 closed pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/125894/
   Test FAILed.


----------------------------------------------------------------
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] Sudhar287 commented on pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Awesome. Thanks! 


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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 pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   Jenkins test 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] MaxGekk commented on a change in pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/RebaseDateTime.scala
##########
@@ -186,7 +186,7 @@ object RebaseDateTime {
       .setTimeZone(TimeZoneUTC)
       .setDate(localDate.getYear, localDate.getMonthValue - 1, localDate.getDayOfMonth)
       .build()
-    Math.toIntExact(Math.floorDiv(utcCal.getTimeInMillis, MILLIS_PER_DAY))
+    Math.toIntExact(utcCal.getTimeInMillis, MILLIS_PER_DAY)

Review comment:
       Here, the question is not about performance but about our understanding of the logic.
   If we set only date fields:
   ```scala
   .setDate(localDate.getYear, localDate.getMonthValue - 1, localDate.getDayOfMonth)
   ```
   the time part MUST be zero. If it is not, something is wrong going on.
   
   I would add the assert before the division:
   ```scala
   assert(utcCal.getTimeInMillis % MILLIS_PER_DAY == 0)
   ```




----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   **[Test build #126066 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126066/testReport)** for PR 29008 at commit [`02cfa89`](https://github.com/apache/spark/commit/02cfa895aee27c0ba9493a264647b0082680dc15).


----------------------------------------------------------------
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] MaxGekk commented on pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   @Sudhar287 Please, clean up PR's description, and the title (it is so generic).


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   **[Test build #125977 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/125977/testReport)** for PR 29008 at commit [`02cfa89`](https://github.com/apache/spark/commit/02cfa895aee27c0ba9493a264647b0082680dc15).


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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] Sudhar287 commented on pull request #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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


   PTAL @MaxGekk :)


----------------------------------------------------------------
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 #29008: [SPARK-31579][SQL] replaced floorDiv to Div

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






----------------------------------------------------------------
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