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 2021/06/19 20:59:44 UTC

[GitHub] [spark] sarutak opened a new pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

sarutak opened a new pull request #32982:
URL: https://github.com/apache/spark/pull/32982


   ### 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 fixes an issue that `IntervalUtils.toYearMonthIntervalString` doesn't consider the case that year-month interval type is casted as month interval type.
   If a year-month interval data is casted as month interval, the value of the year is multiplied by `12` and added to the value of month. For example, `'INTERVAL 1-2' YEAR TO MONTH` will be `INTERVAL 14` MONTH`if  it's casted.
   If this behavior is intended, it's stringified to be `'INTERVAL 14' MONTH` but currently, it will be `INTERVAL '2' MONTH`
   
   ### 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.
   -->
   It's a bug if the behavior of cast is intended.
   
   ### 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'.
   -->
   No, because this feature is not released yet.
   
   ### 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.
   -->
   Modified the tests added in SPARK-35771 (#32924).


-- 
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] sarutak edited a comment on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
sarutak edited a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864514465


   @MaxGekk BTW, what do you think day-time should be?
   If `interval '1 2:3' day to minute` is casted as ` interval hour to minute`, `interval '25:3' hour to minute` doesn't conform to ANSI.
   
   One option would be to compromise the ANSI compliance only for the string representation of such types like RDBMSs does, and represent like `interval '25' hour '3' minute`.
   Just FYI, PostgreSQL seems always show `<day> <hour>:<minute>:<second>` regardless of its type.


-- 
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 edited a comment on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
MaxGekk edited a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864517671


   > If interval '1 2:3' day to minute is casted as interval hour to minute, interval '25:3' hour to minute doesn't conform to ANSI.
   
   I think the restriction of 0..23 for hours is applicable when it is in middle. But if the field is the start field, its range is restricted either by precision, see SQL standard rules:
   ```
   <start field> ::=
   <non-second primary datetime field>
         [ <left paren> <interval leading field precision> <right paren> ]
   <interval leading field precision> ::=
     <unsigned integer>
   ```
   We can confirmation of this at the section 4.6.3:
   ```
   Within a value of type interval, the first field is constrained only by the <interval leading field precision> of the associated <interval qualifier>. Table 6, “Valid values for fields in INTERVAL values”, specifies the con- straints on subsequent field values.
   ```
   In our case `interval leading field precision` has a default value limited by internal type `Long`.


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864485598


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140029/
   


-- 
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 pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864522693


   > doesn't means the valid range of each field doesn't it?
   
   I think it does. For example, `INTERVAL HOUR(5) TO SECOND` means the `HOUR` field can have 5 digits. And as the consequence of that, its maximum values is 99999. So, the range for hours 0..99999. And of course, the intervals might have a sign, and the range for such type of intervals is `INTERVAL '-99999:59:59.999999' HOUR(5) TO SECOND` ... `INTERVAL '99999:59:59.999999' HOUR(5) TO SECOND` ( in our case the precision of seconds is microseconds).


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864485598


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140029/
   


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864464853


   **[Test build #140029 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140029/testReport)** for PR 32982 at commit [`003dc84`](https://github.com/apache/spark/commit/003dc84d2a55c8ac38e5fd48e98a8bf73f4543a9).


-- 
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] sarutak edited a comment on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
sarutak edited a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864521701


   I confirmed the syntax rule but the `precision` here means the number of digit and doesn't means the valid range of each field doesn't it?
   And the range of `HOUR` seems limited within `0-23`.
   
   ![interval-rule](https://user-images.githubusercontent.com/4736016/122667972-b7be7280-d1f0-11eb-9278-c7faf334d575.png)
   


-- 
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] sarutak edited a comment on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
sarutak edited a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864514465


   @MaxGekk BTW, what do you think day-time should be?
   If `interval '1 2:3' day to minute` is casted as ` interval hour to minute`, `interval '25:3' hour to minute` doesn't conform to ANSI.
   
   One option would be to compromise the ANSI compliance only for the string representation of such types like RDBMSs does, and represent like `interval '25' hour '3' minute`.
   Just FYI, PostgreSQL seems always show `<day> <hour>:<minute>:<second>` regardless of it's type.


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864474932


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44556/
   


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864474932


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44556/
   


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864469229


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44556/
   


-- 
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 closed pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
MaxGekk closed pull request #32982:
URL: https://github.com/apache/spark/pull/32982


   


-- 
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] sarutak edited a comment on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
sarutak edited a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864514465


   @MaxGekk BTW, what do you think day-time should be?
   If `interval '1 2:3' day to minute` is casted as ` interval hour to minute`, `interval '25:3' hour to minute` doesn't conform to ANSI.
   
   One option would be to compromise the ANSI compliance only for the string representation of such types and represent like `interval '25' hour '3' minute`.


-- 
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] sarutak commented on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864571128


   O.K, the standard says as follows.
   ```
   Within a value of type interval, the first field is constrained only by the <interval leading fieldprecision> of the associated <interval qualifier>.  Table 8, ‘‘Valid values for fields in INTERVALvalues’’, specifies the constraints on subsequent field values.
   ```
   So, the first field seems to be constrained only by the number of digit. Thanks.


-- 
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 pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864517671


   > If interval '1 2:3' day to minute is casted as interval hour to minute, interval '25:3' hour to minute doesn't conform to ANSI.
   
   I think the restriction of 0..23 for hours is applicable when it is in middle. But if the field is the start field, its range is restricted either by precision, see SQL standard rules:
   ```
   <start field> ::=
   <non-second primary datetime field>
         [ <left paren> <interval leading field precision> <right paren> ]
   <interval leading field precision> ::=
     <unsigned integer>
   ```
   We can confirmation of this at the section 4.6.3:
   ```
   Within a value of type interval, the first field is constrained only by the <interval leading field precision> of the associated <interval qualifier>. Table 6, “Valid values for fields in INTERVAL values”, specifies the con- straints on subsequent field values.
   ```


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864485354


   **[Test build #140029 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140029/testReport)** for PR 32982 at commit [`003dc84`](https://github.com/apache/spark/commit/003dc84d2a55c8ac38e5fd48e98a8bf73f4543a9).
    * 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] sarutak commented on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864521701


   I confirmed the syntax rule but the `precision` here means the number of digit and doesn't means the valid range of each field doesn't it?
   And the range of `MONTH` seems limited within `0-11`.
   
   ![interval-rule](https://user-images.githubusercontent.com/4736016/122667972-b7be7280-d1f0-11eb-9278-c7faf334d575.png)
   


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864471991


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44556/
   


-- 
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 edited a comment on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
MaxGekk edited a comment on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864517671


   > If interval '1 2:3' day to minute is casted as interval hour to minute, interval '25:3' hour to minute doesn't conform to ANSI.
   
   I think the restriction of 0..23 for hours is applicable when it is in middle. But if the field is the start field, its range is restricted either by precision, see SQL standard rules:
   ```
   <start field> ::=
   <non-second primary datetime field>
         [ <left paren> <interval leading field precision> <right paren> ]
   <interval leading field precision> ::=
     <unsigned integer>
   ```
   We can a confirmation of this at the section 4.6.3:
   ```
   Within a value of type interval, the first field is constrained only by the <interval leading field precision> of the associated <interval qualifier>. Table 6, “Valid values for fields in INTERVAL values”, specifies the con- straints on subsequent field values.
   ```
   In our case `interval leading field precision` has a default value limited by internal type `Long`.


-- 
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 #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864464853


   **[Test build #140029 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140029/testReport)** for PR 32982 at commit [`003dc84`](https://github.com/apache/spark/commit/003dc84d2a55c8ac38e5fd48e98a8bf73f4543a9).


-- 
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] sarutak commented on pull request #32982: [SPARK-35771][SQL][FOLLOWUP] IntervalUtils.toYearMonthIntervalString should consider the case year-month type is casted as month type

Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #32982:
URL: https://github.com/apache/spark/pull/32982#issuecomment-864514465


   @MaxGekk BTW, what do you think day-time should be?
   If `interval '1 2:3' day to minute` is casted as ` interval hour to minute`, `interval '25:3' hour to minute` doesn't conform to ANSI.


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