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/11/17 17:37:17 UTC
[GitHub] [spark] ulysses-you opened a new pull request #30400: [SPARK-33469][SQL] Add current_timezone function
ulysses-you opened a new pull request #30400:
URL: https://github.com/apache/spark/pull/30400
<!--
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.
-->
Add a `CurrentTimeZone` function.
### 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.
-->
Let user get current timezone easily. Then user can call
```
SELECT current_timezone()
```
### 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'.
-->
Yes, a new function.
### 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.
-->
Add test.
----------------------------------------------------------------
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] dongjoon-hyun edited a comment on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun edited a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731357771
Good point, @MaxGekk . Could you give us your use cases, @ulysses-you ?
IMO, in the Spark SQL world (Spark Thrift Server or Spark SQL Shell), the following is the only way.
```
spark-sql> set spark.sql.session.timeZone;
spark.sql.session.timeZone America/Los_Angeles
Time taken: 0.034 seconds, Fetched 1 row(s)
```
In other words, we cannot use it in Spark SQL DML statements. I guess you have some use cases for that.
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729129683
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731496340
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36062/
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731363514
----------------------------------------------------------------
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] dongjoon-hyun commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r527882894
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -73,6 +73,21 @@ trait TimestampFormatterHelper extends TimeZoneAwareExpression {
}
}
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timezone.",
Review comment:
Do we need to say that it's a session local timezone explicitly?
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729433303
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35850/
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729113481
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35832/
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731496345
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731713103
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/131496/
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 commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729441885
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729129664
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35832/
----------------------------------------------------------------
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] maropu commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r525591359
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -73,6 +73,21 @@ trait TimestampFormatterHelper extends TimeZoneAwareExpression {
}
}
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timezone.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ Asia/Shanghai
Review comment:
You need to add this func in the ignored set: https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/expressions/ExpressionInfoSuite.scala#L148
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731363494
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36041/
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731713026
**[Test build #131496 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131496/testReport)** for PR 30400 at commit [`c83da46`](https://github.com/apache/spark/commit/c83da46530ad1d4c5527a05e94c7fbad3eafba84).
* This patch **fails due to an unknown error code, -9**.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `class ExecutorSource(`
* ` case class GetShufflePushMergerLocations(numMergersNeeded: Int, hostsToFilter: Set[String])`
* ` case class RemoveShufflePushMergerLocation(host: String) extends ToBlockManagerMaster`
* `abstract class LikeAllBase extends UnaryExpression with ImplicitCastInputTypes with NullIntolerant `
* `case class LikeAll(child: Expression, patterns: Seq[UTF8String]) extends LikeAllBase `
* `case class NotLikeAll(child: Expression, patterns: Seq[UTF8String]) extends LikeAllBase `
* `case class ParseUrl(children: Seq[Expression], failOnError: Boolean = SQLConf.get.ansiEnabled)`
* ` implicit class MetadataColumnsHelper(metadata: Array[MetadataColumn]) `
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731704842
**[Test build #131496 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131496/testReport)** for PR 30400 at commit [`c83da46`](https://github.com/apache/spark/commit/c83da46530ad1d4c5527a05e94c7fbad3eafba84).
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731707738
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36100/
----------------------------------------------------------------
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] ulysses-you edited a comment on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
ulysses-you edited a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731486039
@dongjoon-hyun @MaxGekk The difference between config and function, I think the later can calculate with other data. That says we can do some compare or save the data into storage engine. We introduce many date-related function in recent version, then the timezone is important.
> In other words, we cannot use it in Spark SQL DML statements. I guess you have some use cases for that.
ah, actually I have not seen some case with it and just consider we may need it sometime.
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731452601
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731324807
**[Test build #131435 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131435/testReport)** for PR 30400 at commit [`73f71c5`](https://github.com/apache/spark/commit/73f71c541a63fd18cbdd2d16317b8d0ad30417b5).
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729129683
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729441885
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] SparkQA commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731507660
**[Test build #131456 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131456/testReport)** for PR 30400 at commit [`b591ff7`](https://github.com/apache/spark/commit/b591ff7a000567de8cdc48f2a50af64e50da897e).
* This patch **fails Spark 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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729509143
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/131247/
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729091277
**[Test build #131229 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131229/testReport)** for PR 30400 at commit [`2e48507`](https://github.com/apache/spark/commit/2e48507e0c6caf76705814caa5e044a0a927f466).
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731451810
**[Test build #131435 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131435/testReport)** for PR 30400 at commit [`73f71c5`](https://github.com/apache/spark/commit/73f71c541a63fd18cbdd2d16317b8d0ad30417b5).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731496345
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] SparkQA commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731347977
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36041/
----------------------------------------------------------------
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] dongjoon-hyun commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r527883830
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
##########
@@ -1947,6 +1947,12 @@ class DatasetSuite extends QueryTest
df.where($"zoo".contains(Array('a', 'b'))),
Seq(Row("abc")))
}
+
+ test("SPARK-33469: Add current_timezone function") {
+ val df = Seq(1).toDF("c")
+ val timezone = df.selectExpr("current_timezone()").collect().head.getString(0)
+ assert(timezone == SQLConf.get.sessionLocalTimeZone)
Review comment:
For this test, is it possible to set `sessionLocalTimeZone` explicitly and check with it?
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729509127
----------------------------------------------------------------
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] ulysses-you commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731976549
thanks for merging !
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731452601
----------------------------------------------------------------
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] ulysses-you commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r528051114
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -73,6 +73,21 @@ trait TimestampFormatterHelper extends TimeZoneAwareExpression {
}
}
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timezone.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ Asia/Shanghai
Review comment:
I also read it and feel a little confused. Maybe it depend on the location since the doc said `zone or offset`.
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729091277
**[Test build #131229 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131229/testReport)** for PR 30400 at commit [`2e48507`](https://github.com/apache/spark/commit/2e48507e0c6caf76705814caa5e044a0a927f466).
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731324807
**[Test build #131435 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131435/testReport)** for PR 30400 at commit [`73f71c5`](https://github.com/apache/spark/commit/73f71c541a63fd18cbdd2d16317b8d0ad30417b5).
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729119537
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] SparkQA removed a comment on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731486627
**[Test build #131456 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131456/testReport)** for PR 30400 at commit [`b591ff7`](https://github.com/apache/spark/commit/b591ff7a000567de8cdc48f2a50af64e50da897e).
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729508415
**[Test build #131247 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131247/testReport)** for PR 30400 at commit [`73f71c5`](https://github.com/apache/spark/commit/73f71c541a63fd18cbdd2d16317b8d0ad30417b5).
* 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
---------------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r525591825
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -73,6 +73,21 @@ trait TimestampFormatterHelper extends TimeZoneAwareExpression {
}
}
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timezone.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ Asia/Shanghai
+ """,
+ group = "datetime_funcs",
+ since = "3.1.0")
+case class CurrentTimeZone() extends LeafExpression with Unevaluable {
Review comment:
Please update the golden file, too. https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/ExpressionsSchemaSuite.scala#L38-L41
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729119537
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731486627
**[Test build #131456 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131456/testReport)** for PR 30400 at commit [`b591ff7`](https://github.com/apache/spark/commit/b591ff7a000567de8cdc48f2a50af64e50da897e).
----------------------------------------------------------------
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] maropu commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r526029633
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -73,6 +73,21 @@ trait TimestampFormatterHelper extends TimeZoneAwareExpression {
}
}
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timezone.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ Asia/Shanghai
Review comment:
We don't need to print `an offset from UTC (e.g., +08:35)`? It seems presto/sql server do so (IMO printing it looks meaningful).
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729509127
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] ulysses-you edited a comment on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
ulysses-you edited a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731486039
@dongjoon-hyun @MaxGekk The difference between config and function, I think the later can calculate with other data. That says we can do some compare or save the data into storage engine. We introduce many date-related function in recent version, then the timezone is important.
> In other words, we cannot use it in Spark SQL DML statements. I guess you have some use cases for that.
ah, actually I have not seen some case with it and just consider we may need it sometime.
We can also show the offset as @maropu said that make it different with `set spark.sql.session.timeZone`.
----------------------------------------------------------------
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] dongjoon-hyun closed pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #30400:
URL: https://github.com/apache/spark/pull/30400
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731713102
----------------------------------------------------------------
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] dongjoon-hyun commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731601529
Could you rebase this, @ulysses-you ? There was a bug fix for GitHub Action Hive test failure in `master` branch.
----------------------------------------------------------------
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] ulysses-you commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729396291
@dongjoon-hyun yes, presto has this function.
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729441873
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/35850/
----------------------------------------------------------------
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] dongjoon-hyun commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731324129
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] SparkQA removed a comment on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729400055
**[Test build #131247 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131247/testReport)** for PR 30400 at commit [`73f71c5`](https://github.com/apache/spark/commit/73f71c541a63fd18cbdd2d16317b8d0ad30417b5).
----------------------------------------------------------------
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] dongjoon-hyun commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r527884295
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/expressions/ExpressionInfoSuite.scala
##########
@@ -150,6 +150,7 @@ class ExpressionInfoSuite extends SparkFunSuite with SharedSparkSession {
"org.apache.spark.sql.catalyst.expressions.CurrentDate",
"org.apache.spark.sql.catalyst.expressions.CurrentTimestamp",
"org.apache.spark.sql.catalyst.expressions.Now",
+ "org.apache.spark.sql.catalyst.expressions.CurrentTimeZone",
Review comment:
Shall we add this after `CurrentTimestamp` like the following?
```scala
"org.apache.spark.sql.catalyst.expressions.CurrentTimestamp",
"org.apache.spark.sql.catalyst.expressions.CurrentTimeZone",
"org.apache.spark.sql.catalyst.expressions.Now",
```
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731496352
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36062/
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729441891
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/35850/
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 commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731704842
**[Test build #131496 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131496/testReport)** for PR 30400 at commit [`c83da46`](https://github.com/apache/spark/commit/c83da46530ad1d4c5527a05e94c7fbad3eafba84).
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731507713
----------------------------------------------------------------
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] dongjoon-hyun commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731357771
Good point, @MaxGekk . Could you give us your use cases, @ulysses-you ?
IMO, in the Spark SQL world (Spark Thrift Server or Spark SQL Shell), the following is the only way.
```
spark-sql> set spark.sql.session.timeZone;
spark.sql.session.timeZone America/Los_Angeles
Time taken: 0.034 seconds, Fetched 1 row(s)
```
In other worlds, we cannot use it in Spark SQL DML statements. I guess you have some use cases for that.
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731507713
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] SparkQA commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729400055
**[Test build #131247 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131247/testReport)** for PR 30400 at commit [`73f71c5`](https://github.com/apache/spark/commit/73f71c541a63fd18cbdd2d16317b8d0ad30417b5).
----------------------------------------------------------------
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] ulysses-you commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r525783493
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -73,6 +73,21 @@ trait TimestampFormatterHelper extends TimeZoneAwareExpression {
}
}
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timezone.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ Asia/Shanghai
+ """,
+ group = "datetime_funcs",
+ since = "3.1.0")
+case class CurrentTimeZone() extends LeafExpression with Unevaluable {
Review comment:
thanks for the remind, get it.
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731492511
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36062/
----------------------------------------------------------------
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] maropu commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
maropu commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731654902
Since this feature might be useful for SQL users, adding it 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
---------------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731710131
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731363529
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/36041/
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731710131
----------------------------------------------------------------
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] dongjoon-hyun commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r527908289
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -73,6 +73,21 @@ trait TimestampFormatterHelper extends TimeZoneAwareExpression {
}
}
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timezone.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ Asia/Shanghai
Review comment:
@ulysses-you . Oh, interesting. Does it mean Presto documentation has a bug?
- https://prestodb.io/docs/current/functions/datetime.html
> Returns the current time zone in the format defined by IANA (e.g., America/Los_Angeles) or as fixed offset from UTC (e.g., +08:35)
----------------------------------------------------------------
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] dongjoon-hyun commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731866503
Thank you, @ulysses-you and @maropu and @MaxGekk .
Merged to master for Apache Spark 3.1.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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729119254
**[Test build #131229 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/131229/testReport)** for PR 30400 at commit [`2e48507`](https://github.com/apache/spark/commit/2e48507e0c6caf76705814caa5e044a0a927f466).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `case class CurrentTimeZone() extends LeafExpression with Unevaluable `
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731363514
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] ulysses-you commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731486039
@dongjoon-hyun @MaxGekk The difference between config and function, I think the later can calculate with other data. That says we can do some compare or save the data into storage engine.
> In other words, we cannot use it in Spark SQL DML statements. I guess you have some use cases for that.
ah, actually I have not seen some case with it and just consider we may need it sometime.
----------------------------------------------------------------
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] ulysses-you commented on a change in pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #30400:
URL: https://github.com/apache/spark/pull/30400#discussion_r526083328
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -73,6 +73,21 @@ trait TimestampFormatterHelper extends TimeZoneAwareExpression {
}
}
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timezone.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ Asia/Shanghai
Review comment:
Presto seems return the zone id, not see the offset. (checked both use and code).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731710125
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36100/
----------------------------------------------------------------
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731713102
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-731507716
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/131456/
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 #30400: [SPARK-33469][SQL] Add current_timezone function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30400:
URL: https://github.com/apache/spark/pull/30400#issuecomment-729119549
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/131229/
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