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/02/07 09:41:53 UTC
[GitHub] [spark] MaxGekk opened a new pull request #27491: [MINOR] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
MaxGekk opened a new pull request #27491: [MINOR] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491
### What changes were proposed in this pull request?
In the case of back-to-back calculation of `floorDiv` and `floorMod` with the same arguments, the result of `foorDiv` can be reused in calculation of `floorMod`. The `floorMod` method is defined as the following in Java standard library:
```java
public static int floorMod(int x, int y) {
int r = x - floorDiv(x, y) * y;
return r;
}
```
If `floorDiv(x, y)` has been already calculated, it can be reused in `x - floorDiv(x, y) * y`.
I propose to modify 2 places in `DateTimeUtils`:
1. `microsToInstant` which is widely used in many date-time functions. `Math.floorMod(us, MICROS_PER_SECOND)` is just replaced by its definition from Java Math library.
2. `truncDate`: `Math.floorMod(oldYear, divider) == 0` is replaced by `Math.floorDiv(oldYear, divider) * divider == oldYear` where `floorDiv(...) * divider` is pre-calculated.
### Why are the changes needed?
This reduces the number of arithmetic operations, and can slightly improve performance of date-time functions.
### Does this PR introduce any user-facing change?
No
### How was this patch tested?
By existing test suites `DateTimeUtilsSuite`, `DateFunctionsSuite` and `DateExpressionsSuite`.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584124069
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118140/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584001883
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584002423
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on issue #27491: [MINOR] Reuse results of
floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27491: [MINOR] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583312330
**[Test build #118031 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118031/testReport)** for PR 27491 at commit [`363d8a2`](https://github.com/apache/spark/commit/363d8a25baa5f8be8066b940d098c574e9236571).
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583312330
**[Test build #118031 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118031/testReport)** for PR 27491 at commit [`363d8a2`](https://github.com/apache/spark/commit/363d8a25baa5f8be8066b940d098c574e9236571).
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584000935
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491: [MINOR]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [MINOR] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583313229
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583402205
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118031/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] maropu commented on a change in pull request #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#discussion_r376827899
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -337,7 +337,7 @@ object DateTimeUtils {
def microsToInstant(us: Long): Instant = {
val secs = Math.floorDiv(us, MICROS_PER_SECOND)
- val mos = Math.floorMod(us, MICROS_PER_SECOND)
+ val mos = us - secs * MICROS_PER_SECOND
Review comment:
For better readability, could you leave some comments about the calculation reuse here?
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583402193
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583402205
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118031/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584004568
**[Test build #118140 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118140/testReport)** for PR 27491 at commit [`38cd6da`](https://github.com/apache/spark/commit/38cd6dab1b7c16fbd36ed43ef289630ac2de3aaa).
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] kiszk commented on a change in pull request #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
kiszk commented on a change in pull request #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#discussion_r376968021
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -691,11 +691,11 @@ object DateTimeUtils {
def truncDate(d: SQLDate, level: Int): SQLDate = {
def truncToYearLevel(divider: Int, adjust: Int): SQLDate = {
val oldYear = getYear(d)
- var newYear = Math.floorDiv(oldYear, divider)
- if (adjust > 0 && Math.floorMod(oldYear, divider) == 0) {
- newYear -= 1
+ var newYear = Math.floorDiv(oldYear, divider) * divider
Review comment:
I see. The comment `Returns the year value for the given date. The date is expressed in days since 1.1.1970` in `getYear()` means that the value is relative based on 1.1.1970. If the year is older than 1.1.1970, the value is negative.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583987993
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583987611
**[Test build #118122 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118122/testReport)** for PR 27491 at commit [`38cd6da`](https://github.com/apache/spark/commit/38cd6dab1b7c16fbd36ed43ef289630ac2de3aaa).
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [MINOR] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [MINOR] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583313229
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583988001
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22887/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584000935
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583401556
**[Test build #118031 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118031/testReport)** for PR 27491 at commit [`363d8a2`](https://github.com/apache/spark/commit/363d8a25baa5f8be8066b940d098c574e9236571).
* 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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583402193
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#discussion_r376896787
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -337,7 +337,7 @@ object DateTimeUtils {
def microsToInstant(us: Long): Instant = {
val secs = Math.floorDiv(us, MICROS_PER_SECOND)
- val mos = Math.floorMod(us, MICROS_PER_SECOND)
+ val mos = us - secs * MICROS_PER_SECOND
Review comment:
I added a comment
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583987993
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] maropu commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
maropu commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583908886
The fix looks fine to me.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583987611
**[Test build #118122 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118122/testReport)** for PR 27491 at commit [`38cd6da`](https://github.com/apache/spark/commit/38cd6dab1b7c16fbd36ed43ef289630ac2de3aaa).
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583878390
@kiszk The ops are not regular arithmetic `/` and `%`, they are lib calls. So, they present in byte code:
```
public microsToInstant(J)Ljava/time/Instant;
// parameter final us
L0
LINENUMBER 339 L0
LLOAD 1
LDC 1000000
INVOKESTATIC java/lang/Math.floorDiv (JJ)J
L1
LSTORE 3
L2
LINENUMBER 340 L2
LLOAD 1
LDC 1000000
INVOKESTATIC java/lang/Math.floorMod (JJ)J
```
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] kiszk commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
kiszk commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583874425
Can we use a kind of [this optimization](https://stackoverflow.com/questions/46905740/does-java-have-a-divmod-instruction) in HotSpot?
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584002423
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] srowen commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
srowen commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583448566
It's pretty trivially faster, I'd imagine, but the logic looks sound and it's not more complex
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] kiszk commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
kiszk commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583921202
@MaxGekk Got it. This is not a pair of `div` and `mod`.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
srowen closed pull request #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584124059
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] kiszk commented on a change in pull request #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
kiszk commented on a change in pull request #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#discussion_r376839188
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -691,11 +691,11 @@ object DateTimeUtils {
def truncDate(d: SQLDate, level: Int): SQLDate = {
def truncToYearLevel(divider: Int, adjust: Int): SQLDate = {
val oldYear = getYear(d)
- var newYear = Math.floorDiv(oldYear, divider)
- if (adjust > 0 && Math.floorMod(oldYear, divider) == 0) {
- newYear -= 1
+ var newYear = Math.floorDiv(oldYear, divider) * divider
Review comment:
Sorry for my naive question. Do we need `floorDiv` and `floorMod` here? In my understanding, `oldYear` and `divider` look positive.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584122453
**[Test build #118140 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118140/testReport)** for PR 27491 at commit [`38cd6da`](https://github.com/apache/spark/commit/38cd6dab1b7c16fbd36ed43ef289630ac2de3aaa).
* 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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491: [MINOR]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [MINOR] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583313254
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22796/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584124059
Merged build finished. Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584124069
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118140/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584000942
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118122/
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#discussion_r376890351
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
##########
@@ -691,11 +691,11 @@ object DateTimeUtils {
def truncDate(d: SQLDate, level: Int): SQLDate = {
def truncToYearLevel(divider: Int, adjust: Int): SQLDate = {
val oldYear = getYear(d)
- var newYear = Math.floorDiv(oldYear, divider)
- if (adjust > 0 && Math.floorMod(oldYear, divider) == 0) {
- newYear -= 1
+ var newYear = Math.floorDiv(oldYear, divider) * divider
Review comment:
`oldYear` can be negative, have a look at tests in https://github.com/apache/spark/pull/25230, for instance.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584000942
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/118122/
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
With regards,
Apache Git Services
---------------------------------------------------------------------
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 issue #27491:
[SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in
DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584002433
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22899/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583988001
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22887/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584000770
**[Test build #118122 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118122/testReport)** for PR 27491 at commit [`38cd6da`](https://github.com/apache/spark/commit/38cd6dab1b7c16fbd36ed43ef289630ac2de3aaa).
* This patch **fails due to an unknown error code, -9**.
* 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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584004568
**[Test build #118140 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/118140/testReport)** for PR 27491 at commit [`38cd6da`](https://github.com/apache/spark/commit/38cd6dab1b7c16fbd36ed43ef289630ac2de3aaa).
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584002433
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22899/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on issue #27491: [MINOR] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27491: [MINOR] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583313254
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/22796/
Test PASSed.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] maropu edited a comment on issue #27491: [SPARK-30754][SQL]
Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
maropu edited a comment on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-583908886
The fix looks fine to me. If you have performance numbers, could you put them in the PR decription?
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] srowen commented on issue #27491: [SPARK-30754][SQL] Reuse
results of floorDiv in calculations of floorMod in DateTimeUtils
Posted by GitBox <gi...@apache.org>.
srowen commented on issue #27491: [SPARK-30754][SQL] Reuse results of floorDiv in calculations of floorMod in DateTimeUtils
URL: https://github.com/apache/spark/pull/27491#issuecomment-584680772
Merged to master (leaving out of 3.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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org