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/04/25 08:22:15 UTC
[GitHub] [spark] maropu opened a new pull request #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
maropu opened a new pull request #28342:
URL: https://github.com/apache/spark/pull/28342
<!--
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.
-->
This PR intends to add entries for substring, current_date, and current_timestamp in the SQL built-in function documents. Specifically, the entries are as follows;
- SELECT current_date;
- SELECT current_timestamp;
- SELECT substring('abcd' FROM 1);
- SELECT substring('abcd' FROM 1 FOR 2);
### 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.
-->
To make the SQL (built-in functions) references complete.
### Does this PR introduce any user-facing change?
<!--
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 no, write 'No'.
-->
<img width="1040" alt="Screen Shot 2020-04-25 at 16 51 07" src="https://user-images.githubusercontent.com/692303/80274851-6ca5ee00-8718-11ea-9a35-9ae82008cb4b.png">
### 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.
-->
Added test examples.
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619518131
**[Test build #121834 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121834/testReport)** for PR 28342 at commit [`463c4d3`](https://github.com/apache/spark/commit/463c4d3f69022fa8b2f5ae34675155ca0d87bec7).
* 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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619518465
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415217525
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -83,26 +93,44 @@ case class CurrentDate(timeZoneId: Option[String] = None)
override def prettyName: String = "current_date"
}
+abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback {
+ override def foldable: Boolean = true
+ override def nullable: Boolean = false
+ override def dataType: DataType = TimestampType
+ override def eval(input: InternalRow): Any = currentTimestamp()
+}
+
/**
* Returns the current timestamp at the start of query evaluation.
* All calls of current_timestamp within the same query return the same value.
*
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current timestamp at the start of query evaluation.
+
+ _FUNC_ - Returns the current timestamp at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25 15:49:11.914
+ > SELECT _FUNC_;
+ 2020-04-25 15:49:11.914
+ """,
group = "datetime_funcs",
since = "1.5.0")
-case class CurrentTimestamp() extends LeafExpression with CodegenFallback {
- override def foldable: Boolean = true
- override def nullable: Boolean = false
-
- override def dataType: DataType = TimestampType
-
- override def eval(input: InternalRow): Any = currentTimestamp()
+case class CurrentTimestamp() extends CurrentTimestampLike {
+ override def prettyName: String = "current_timestamp"
+}
- override def prettyName: String =
- getTagValue(FunctionRegistry.FUNC_ALIAS).getOrElse("current_timestamp")
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
Review comment:
nit. Do you think we can have `examples = ` for `now()` since `now` usage is different(having different class and only functional form) from `current_timestamp`?
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619357137
**[Test build #121801 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121801/testReport)** for PR 28342 at commit [`f4a61b8`](https://github.com/apache/spark/commit/f4a61b8ce59550e234ab269b10a0d083996e9fff).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback `
* `case class CurrentTimestamp() extends CurrentTimestampLike `
* `case class Now() extends CurrentTimestampLike `
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415232264
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -83,26 +93,44 @@ case class CurrentDate(timeZoneId: Option[String] = None)
override def prettyName: String = "current_date"
}
+abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback {
+ override def foldable: Boolean = true
+ override def nullable: Boolean = false
+ override def dataType: DataType = TimestampType
+ override def eval(input: InternalRow): Any = currentTimestamp()
+}
+
/**
* Returns the current timestamp at the start of query evaluation.
* All calls of current_timestamp within the same query return the same value.
*
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current timestamp at the start of query evaluation.
+
+ _FUNC_ - Returns the current timestamp at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25 15:49:11.914
+ > SELECT _FUNC_;
+ 2020-04-25 15:49:11.914
+ """,
group = "datetime_funcs",
since = "1.5.0")
-case class CurrentTimestamp() extends LeafExpression with CodegenFallback {
- override def foldable: Boolean = true
- override def nullable: Boolean = false
-
- override def dataType: DataType = TimestampType
-
- override def eval(input: InternalRow): Any = currentTimestamp()
+case class CurrentTimestamp() extends CurrentTimestampLike {
+ override def prettyName: String = "current_timestamp"
+}
- override def prettyName: String =
- getTagValue(FunctionRegistry.FUNC_ALIAS).getOrElse("current_timestamp")
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
Review comment:
Ah I see. I'll add an example for `now` in this PR, too. Actually, I think it is better to add examples for the expressions that do not have examples 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] SparkQA removed a comment on pull request #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619498114
**[Test build #121834 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121834/testReport)** for PR 28342 at commit [`463c4d3`](https://github.com/apache/spark/commit/463c4d3f69022fa8b2f5ae34675155ca0d87bec7).
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619342040
**[Test build #121801 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121801/testReport)** for PR 28342 at commit [`f4a61b8`](https://github.com/apache/spark/commit/f4a61b8ce59550e234ab269b10a0d083996e9fff).
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619375507
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415218045
##########
File path: sql/gen-sql-functions-docs.py
##########
@@ -106,7 +106,7 @@ def _make_pretty_usage(infos):
for info in infos:
# Extracts (signature, description) pairs from `info.usage`, e.g.,
# the signature is `func(expr)` and the description is `...` in an usage `func(expr) - ...`.
Review comment:
Do we need to update this description accordingly because this PR dropped `(` and `)` requirement?
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415014204
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
##########
@@ -404,7 +404,7 @@ object FunctionRegistry {
expression[Month]("month"),
expression[MonthsBetween]("months_between"),
expression[NextDay]("next_day"),
- expression[CurrentTimestamp]("now", true),
+ expression[Now]("now"),
Review comment:
Since the usage is different between `now` and `current_timestamp`, I added a `Now` expr.
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619400906
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619357257
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415217525
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -83,26 +93,44 @@ case class CurrentDate(timeZoneId: Option[String] = None)
override def prettyName: String = "current_date"
}
+abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback {
+ override def foldable: Boolean = true
+ override def nullable: Boolean = false
+ override def dataType: DataType = TimestampType
+ override def eval(input: InternalRow): Any = currentTimestamp()
+}
+
/**
* Returns the current timestamp at the start of query evaluation.
* All calls of current_timestamp within the same query return the same value.
*
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current timestamp at the start of query evaluation.
+
+ _FUNC_ - Returns the current timestamp at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25 15:49:11.914
+ > SELECT _FUNC_;
+ 2020-04-25 15:49:11.914
+ """,
group = "datetime_funcs",
since = "1.5.0")
-case class CurrentTimestamp() extends LeafExpression with CodegenFallback {
- override def foldable: Boolean = true
- override def nullable: Boolean = false
-
- override def dataType: DataType = TimestampType
-
- override def eval(input: InternalRow): Any = currentTimestamp()
+case class CurrentTimestamp() extends CurrentTimestampLike {
+ override def prettyName: String = "current_timestamp"
+}
- override def prettyName: String =
- getTagValue(FunctionRegistry.FUNC_ALIAS).getOrElse("current_timestamp")
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
Review comment:
nit. Do you think we can have `examples = ` for `now()` since `now` usage is different(having different class and only functional form) from `current_timestamp`? Of course, we can skip 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 removed a comment on pull request #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619357257
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619498114
**[Test build #121834 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121834/testReport)** for PR 28342 at commit [`463c4d3`](https://github.com/apache/spark/commit/463c4d3f69022fa8b2f5ae34675155ca0d87bec7).
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619342213
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619450993
cc: @HyukjinKwon @cloud-fan
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619375322
**[Test build #121806 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121806/testReport)** for PR 28342 at commit [`e77a8f8`](https://github.com/apache/spark/commit/e77a8f880403e97113fcac1fe982f09196876d41).
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r449857549
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
##########
@@ -404,7 +404,7 @@ object FunctionRegistry {
expression[Month]("month"),
expression[MonthsBetween]("months_between"),
expression[NextDay]("next_day"),
- expression[CurrentTimestamp]("now", true),
+ expression[Now]("now"),
Review comment:
`CURRENT_TIMESTAMP` is a SQL syntax and `NOW` is not: https://github.com/apache/spark/blob/master/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4#L777
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619400906
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415215025
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -83,26 +93,44 @@ case class CurrentDate(timeZoneId: Option[String] = None)
override def prettyName: String = "current_date"
}
+abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback {
+ override def foldable: Boolean = true
+ override def nullable: Boolean = false
+ override def dataType: DataType = TimestampType
+ override def eval(input: InternalRow): Any = currentTimestamp()
+}
+
/**
* Returns the current timestamp at the start of query evaluation.
* All calls of current_timestamp within the same query return the same value.
*
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current timestamp at the start of query evaluation.
+
+ _FUNC_ - Returns the current timestamp at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25 15:49:11.914
+ > SELECT _FUNC_;
+ 2020-04-25 15:49:11.914
+ """,
group = "datetime_funcs",
since = "1.5.0")
-case class CurrentTimestamp() extends LeafExpression with CodegenFallback {
- override def foldable: Boolean = true
- override def nullable: Boolean = false
-
- override def dataType: DataType = TimestampType
-
- override def eval(input: InternalRow): Any = currentTimestamp()
+case class CurrentTimestamp() extends CurrentTimestampLike {
+ override def prettyName: String = "current_timestamp"
+}
- override def prettyName: String =
- getTagValue(FunctionRegistry.FUNC_ALIAS).getOrElse("current_timestamp")
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ group = "datetime_funcs",
+ since = "1.5.0")
Review comment:
Oh. Sorry, I was confused. Never mind~
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on a change in pull request #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r449848130
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
##########
@@ -404,7 +404,7 @@ object FunctionRegistry {
expression[Month]("month"),
expression[MonthsBetween]("months_between"),
expression[NextDay]("next_day"),
- expression[CurrentTimestamp]("now", true),
+ expression[Now]("now"),
Review comment:
What is the difference between `now` and `current_timestamp`? Should `now` extend `Nondeterministic`, for example?
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415217525
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -83,26 +93,44 @@ case class CurrentDate(timeZoneId: Option[String] = None)
override def prettyName: String = "current_date"
}
+abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback {
+ override def foldable: Boolean = true
+ override def nullable: Boolean = false
+ override def dataType: DataType = TimestampType
+ override def eval(input: InternalRow): Any = currentTimestamp()
+}
+
/**
* Returns the current timestamp at the start of query evaluation.
* All calls of current_timestamp within the same query return the same value.
*
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current timestamp at the start of query evaluation.
+
+ _FUNC_ - Returns the current timestamp at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25 15:49:11.914
+ > SELECT _FUNC_;
+ 2020-04-25 15:49:11.914
+ """,
group = "datetime_funcs",
since = "1.5.0")
-case class CurrentTimestamp() extends LeafExpression with CodegenFallback {
- override def foldable: Boolean = true
- override def nullable: Boolean = false
-
- override def dataType: DataType = TimestampType
-
- override def eval(input: InternalRow): Any = currentTimestamp()
+case class CurrentTimestamp() extends CurrentTimestampLike {
+ override def prettyName: String = "current_timestamp"
+}
- override def prettyName: String =
- getTagValue(FunctionRegistry.FUNC_ALIAS).getOrElse("current_timestamp")
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
Review comment:
Can we have `examples = ` for `now()` since `now` usage is different(having different class and only functional form) from `current_timestamp`?
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619496926
----------------------------------------------------------------
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] HyukjinKwon commented on a change in pull request #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415203732
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -62,7 +61,18 @@ trait TimeZoneAwareExpression extends Expression {
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current date at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current date at the start of query evaluation.
+
+ _FUNC_ - Returns the current date at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25
+ > SELECT _FUNC_;
Review comment:
Do you remember when we started to support this syntax? I roughly remember it was added relatively recently. If the added version is different, it might be best to note it in `note` while we're 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
---------------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415230477
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -62,7 +61,18 @@ trait TimeZoneAwareExpression extends Expression {
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current date at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current date at the start of query evaluation.
+
+ _FUNC_ - Returns the current date at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25
+ > SELECT _FUNC_;
Review comment:
I found the PR to implement the syntax: https://github.com/apache/spark/pull/14442
Spark without the hive support has supported it since 2.0. Yea, I'll add this info as note.
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415161264
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -83,26 +93,44 @@ case class CurrentDate(timeZoneId: Option[String] = None)
override def prettyName: String = "current_date"
}
+abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback {
+ override def foldable: Boolean = true
+ override def nullable: Boolean = false
+ override def dataType: DataType = TimestampType
+ override def eval(input: InternalRow): Any = currentTimestamp()
+}
+
/**
* Returns the current timestamp at the start of query evaluation.
* All calls of current_timestamp within the same query return the same value.
*
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current timestamp at the start of query evaluation.
+
+ _FUNC_ - Returns the current timestamp at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25 15:49:11.914
+ > SELECT _FUNC_;
+ 2020-04-25 15:49:11.914
+ """,
group = "datetime_funcs",
since = "1.5.0")
-case class CurrentTimestamp() extends LeafExpression with CodegenFallback {
- override def foldable: Boolean = true
- override def nullable: Boolean = false
-
- override def dataType: DataType = TimestampType
-
- override def eval(input: InternalRow): Any = currentTimestamp()
+case class CurrentTimestamp() extends CurrentTimestampLike {
+ override def prettyName: String = "current_timestamp"
+}
- override def prettyName: String =
- getTagValue(FunctionRegistry.FUNC_ALIAS).getOrElse("current_timestamp")
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ group = "datetime_funcs",
+ since = "1.5.0")
Review comment:
Actually, `now` has been supported since 1.6.0? https://issues.apache.org/jira/browse/SPARK-11768
Or, you suggested above that we should set the version where this expr added?
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619647134
Thanks, guys! @dongjoon-hyun @HyukjinKwon
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619342213
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619375322
**[Test build #121806 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121806/testReport)** for PR 28342 at commit [`e77a8f8`](https://github.com/apache/spark/commit/e77a8f880403e97113fcac1fe982f09196876d41).
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619518465
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415192404
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
##########
@@ -404,7 +404,7 @@ object FunctionRegistry {
expression[Month]("month"),
expression[MonthsBetween]("months_between"),
expression[NextDay]("next_day"),
- expression[CurrentTimestamp]("now", true),
+ expression[Now]("now"),
Review comment:
btw, we don't need to add a version here where an alias added? For example, `current_timestamp` and `now` have been implemented in the different versions, 1.5 and 1.6.
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619375507
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415098375
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
##########
@@ -83,26 +93,44 @@ case class CurrentDate(timeZoneId: Option[String] = None)
override def prettyName: String = "current_date"
}
+abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback {
+ override def foldable: Boolean = true
+ override def nullable: Boolean = false
+ override def dataType: DataType = TimestampType
+ override def eval(input: InternalRow): Any = currentTimestamp()
+}
+
/**
* Returns the current timestamp at the start of query evaluation.
* All calls of current_timestamp within the same query return the same value.
*
* There is no code generation since this expression should get constant folded by the optimizer.
*/
@ExpressionDescription(
- usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ usage = """
+ _FUNC_() - Returns the current timestamp at the start of query evaluation.
+
+ _FUNC_ - Returns the current timestamp at the start of query evaluation.
+ """,
+ examples = """
+ Examples:
+ > SELECT _FUNC_();
+ 2020-04-25 15:49:11.914
+ > SELECT _FUNC_;
+ 2020-04-25 15:49:11.914
+ """,
group = "datetime_funcs",
since = "1.5.0")
-case class CurrentTimestamp() extends LeafExpression with CodegenFallback {
- override def foldable: Boolean = true
- override def nullable: Boolean = false
-
- override def dataType: DataType = TimestampType
-
- override def eval(input: InternalRow): Any = currentTimestamp()
+case class CurrentTimestamp() extends CurrentTimestampLike {
+ override def prettyName: String = "current_timestamp"
+}
- override def prettyName: String =
- getTagValue(FunctionRegistry.FUNC_ALIAS).getOrElse("current_timestamp")
+@ExpressionDescription(
+ usage = "_FUNC_() - Returns the current timestamp at the start of query evaluation.",
+ group = "datetime_funcs",
+ since = "1.5.0")
Review comment:
I guess `now` should be 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] maropu commented on a change in pull request #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
maropu commented on a change in pull request #28342:
URL: https://github.com/apache/spark/pull/28342#discussion_r415192404
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
##########
@@ -404,7 +404,7 @@ object FunctionRegistry {
expression[Month]("month"),
expression[MonthsBetween]("months_between"),
expression[NextDay]("next_day"),
- expression[CurrentTimestamp]("now", true),
+ expression[Now]("now"),
Review comment:
btw, we don't need to add a version where an alias added? For example, `current_timestamp` and `now` have been implemented in the different versions, 1.5 and 1.6.
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619400612
**[Test build #121806 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121806/testReport)** for PR 28342 at commit [`e77a8f8`](https://github.com/apache/spark/commit/e77a8f880403e97113fcac1fe982f09196876d41).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `abstract class CurrentTimestampLike() extends LeafExpression with CodegenFallback `
* `case class CurrentTimestamp() extends CurrentTimestampLike `
* `case class Now() extends CurrentTimestampLike `
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619496926
----------------------------------------------------------------
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619357262
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/121801/
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 #28342: [SPARK-31562][SQL] Update ExpressionDescription for substring, current_date, and current_timestamp
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28342:
URL: https://github.com/apache/spark/pull/28342#issuecomment-619342040
**[Test build #121801 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/121801/testReport)** for PR 28342 at commit [`f4a61b8`](https://github.com/apache/spark/commit/f4a61b8ce59550e234ab269b10a0d083996e9fff).
----------------------------------------------------------------
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