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/06/29 23:31:34 UTC

[GitHub] [spark] TJX2014 commented on a change in pull request #28926: [SPARK-32133][SQL] Forbid time field steps for date start/end in Sequence

TJX2014 commented on a change in pull request #28926:
URL: https://github.com/apache/spark/pull/28926#discussion_r447316906



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
##########
@@ -2612,6 +2614,9 @@ object Sequence {
       val stepDays = step.days
       val stepMicros = step.microseconds
 
+      require(scale != MICROS_PER_DAY || stepMonths != 0 || stepDays != 0,
+        "sequence step must be a day interval if start and end values are dates")
+
       if (stepMonths == 0 && stepMicros == 0 && scale == MICROS_PER_DAY) {

Review comment:
       Seems we need the `require` check in eval, and I remove `SPARK-32198` branch code from this PR, is it ok ?




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