This is an automated email from the ASF dual-hosted git repository.
gengliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 900b72a [SPARK-35088][SQL][FOLLOWUP] Add test case for TimestampNTZ
sequence with default step
900b72a is described below
commit 900b72a9cd74b45cff35a7a64781e98222c03959
Author: gengjiaan <[email protected]>
AuthorDate: Thu Jul 22 17:53:22 2021 +0800
[SPARK-35088][SQL][FOLLOWUP] Add test case for TimestampNTZ sequence with
default step
### What changes were proposed in this pull request?
This PR follows up https://github.com/apache/spark/pull/33360 and add test
case for `TimestampNTZ` sequence with default step.
### Why are the changes needed?
Improve test coverage.
### Does this PR introduce _any_ user-facing change?
'No'.
Just add test cases.
### How was this patch tested?
New tests.
Closes #33462 from beliefer/SPARK-36090-followup.
Authored-by: gengjiaan <[email protected]>
Signed-off-by: Gengliang Wang <[email protected]>
---
.../expressions/CollectionExpressionsSuite.scala | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala
index caa5e96..8f35cf3 100644
---
a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala
+++
b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala
@@ -1325,6 +1325,23 @@ class CollectionExpressionsSuite extends SparkFunSuite
with ExpressionEvalHelper
Date.valueOf("2018-01-03"),
Date.valueOf("2018-01-02"),
Date.valueOf("2018-01-01")))
+
+ // +/- 1 day for LocalDateTimes
+ checkEvaluation(new Sequence(
+ Literal(LocalDateTime.parse("2018-01-01T00:00:00")),
+ Literal(LocalDateTime.parse("2018-01-03T00:00:00"))),
+ Seq(
+ LocalDateTime.parse("2018-01-01T00:00:00"),
+ LocalDateTime.parse("2018-01-02T00:00:00"),
+ LocalDateTime.parse("2018-01-03T00:00:00")))
+
+ checkEvaluation(new Sequence(
+ Literal(LocalDateTime.parse("2018-01-03T00:00:00")),
+ Literal(LocalDateTime.parse("2018-01-01T00:00:00"))),
+ Seq(
+ LocalDateTime.parse("2018-01-03T00:00:00"),
+ LocalDateTime.parse("2018-01-02T00:00:00"),
+ LocalDateTime.parse("2018-01-01T00:00:00")))
}
test("Reverse") {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]