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 18:34:41 UTC
[GitHub] [spark] sarutak opened a new pull request #32978: [SPARK-35827][SQL] Show proper erro message when update column types to year-month/day-time interval
sarutak opened a new pull request #32978:
URL: https://github.com/apache/spark/pull/32978
### 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 error message shown when changing a column type to year-month/day-time interval type is attempted.
### 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 for consistent behavior.
Updating column types to interval types are prohibited for V2 source tables.
So, if we attempt to update the type of a column to the conventional interval type, an error message like `Error in query: Cannot update <table> field <column> to interval type;`.
But, for year-month/day-time interval types, another error message like `Error in query: Cannot update <table> field <column>:<type> cannot be cast to interval year;`.
You can reproduce with the following procedure.
```
$ bin/spark-sql
spark-sql> SET spark.sql.catalog.mycatalog=<a catalog implementation class>;
spark-sql> CREATE TABLE mycatalog.t1(c1 int) USING <V2 datasource implementation class>;
spark-sql> ALTER TABLE mycatalog.t1 ALTER COLUMN c1 TYPE interval year to month;
```
### 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.
### 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 an existing 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] SparkQA commented on pull request #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864476478
**[Test build #140026 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140026/testReport)** for PR 32978 at commit [`9c4e76a`](https://github.com/apache/spark/commit/9c4e76a5c7565810f7c67f52ccff852c74ecbddb).
* 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] SparkQA removed a comment on pull request #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864452362
**[Test build #140026 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140026/testReport)** for PR 32978 at commit [`9c4e76a`](https://github.com/apache/spark/commit/9c4e76a5c7565810f7c67f52ccff852c74ecbddb).
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
MaxGekk closed pull request #32978:
URL: https://github.com/apache/spark/pull/32978
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864464772
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44551/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864457495
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44551/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864479785
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140026/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864609194
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44578/
--
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 pull request #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864490488
cc @gengliangwang and @MaxGekk FYI
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864479785
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140026/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864461356
Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44551/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864627897
**[Test build #140050 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140050/testReport)** for PR 32978 at commit [`35389a8`](https://github.com/apache/spark/commit/35389a8805a1ca0571b8e57feb6b33907b99458d).
* 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 commented on pull request #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864613385
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44578/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864628218
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140050/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864628218
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140050/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864600318
**[Test build #140050 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140050/testReport)** for PR 32978 at commit [`35389a8`](https://github.com/apache/spark/commit/35389a8805a1ca0571b8e57feb6b33907b99458d).
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864452362
**[Test build #140026 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140026/testReport)** for PR 32978 at commit [`9c4e76a`](https://github.com/apache/spark/commit/9c4e76a5c7565810f7c67f52ccff852c74ecbddb).
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #32978:
URL: https://github.com/apache/spark/pull/32978#discussion_r654865797
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -533,7 +533,8 @@ trait CheckAnalysis extends PredicateHelper with LookupCatalog {
case u: UserDefinedType[_] =>
alter.failAnalysis(s"Cannot update ${table.name} field $fieldName type: " +
s"update a UserDefinedType[${u.sql}] by updating its fields")
- case _: CalendarIntervalType =>
+ case _: CalendarIntervalType | _: YearMonthIntervalType |
+ _: DayTimeIntervalType =>
Review comment:
Hm, so we should fix all these kind of blacklisting .. while this fix is good, I wonder if we can sweep and fix in batch.
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864605242
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44578/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864613385
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44578/
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864600318
**[Test build #140050 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140050/testReport)** for PR 32978 at commit [`35389a8`](https://github.com/apache/spark/commit/35389a8805a1ca0571b8e57feb6b33907b99458d).
--
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 a change in pull request #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #32978:
URL: https://github.com/apache/spark/pull/32978#discussion_r654969092
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/AlterTableTests.scala
##########
@@ -403,8 +403,24 @@ trait AlterTableTests extends SharedSparkSession {
val t = s"${catalogAndNamespace}table_name"
withTable(t) {
sql(s"CREATE TABLE $t (id int) USING $v2Format")
- val e = intercept[AnalysisException](sql(s"ALTER TABLE $t ALTER COLUMN id TYPE interval"))
- assert(e.getMessage.contains("id to interval type"))
+ Seq(
+ "interval",
+ "interval year",
+ "interval month",
+ "interval year to month",
+ "interval day",
+ "interval hour",
+ "interval minute",
+ "interval second",
+ "interval day to second",
+ "interval day to minute",
+ "interval day to hour",
+ "interval hour to second",
+ "interval hour to minute",
+ "interval minute to second").foreach { case dtype =>
Review comment:
Ah, O.K, I'll replace them. 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] sarutak commented on a change in pull request #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #32978:
URL: https://github.com/apache/spark/pull/32978#discussion_r654972527
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -533,7 +533,8 @@ trait CheckAnalysis extends PredicateHelper with LookupCatalog {
case u: UserDefinedType[_] =>
alter.failAnalysis(s"Cannot update ${table.name} field $fieldName type: " +
s"update a UserDefinedType[${u.sql}] by updating its fields")
- case _: CalendarIntervalType =>
+ case _: CalendarIntervalType | _: YearMonthIntervalType |
+ _: DayTimeIntervalType =>
Review comment:
Actually, I have found another places where `DayTimeINtervalType` and `YearMonthIntervalType` are not considered.
In terms of blacklisting, I found this part only (if I didn't miss something).
The rest of places we need to consider is as follows.
* https://github.com/apache/spark/blob/4f51e0045e2754035e304979182c0f583c65f174/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateUnsafeProjection.scala#L42
* https://github.com/apache/spark/blob/4f51e0045e2754035e304979182c0f583c65f174/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala#L155
* https://github.com/apache/spark/blob/4f51e0045e2754035e304979182c0f583c65f174/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala#L191
* https://github.com/apache/spark/blob/4f51e0045e2754035e304979182c0f583c65f174/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ArrayBasedMapBuilder.scala#L37
* https://github.com/apache/spark/blob/4f51e0045e2754035e304979182c0f583c65f174/sql/hive/src/test/scala/org/apache/spark/sql/hive/orc/OrcHadoopFsRelationSuite.scala#L40
* https://github.com/apache/spark/blob/master/sql/hive/src/test/scala/org/apache/spark/sql/sources/ParquetHadoopFsRelationSuite.scala#L41
* https://github.com/apache/spark/blob/4f51e0045e2754035e304979182c0f583c65f174/sql/hive/src/test/scala/org/apache/spark/sql/sources/JsonHadoopFsRelationSuite.scala#L35
* https://github.com/apache/spark/blob/4f51e0045e2754035e304979182c0f583c65f174/sql/hive/src/test/scala/org/apache/spark/sql/sources/SimpleTextHadoopFsRelationSuite.scala#L36
I think, we need to fix them with beyond just blacklisting and they need to be more carefully considered while this part can be simply fixed.
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #32978:
URL: https://github.com/apache/spark/pull/32978#discussion_r654962693
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/AlterTableTests.scala
##########
@@ -403,8 +403,24 @@ trait AlterTableTests extends SharedSparkSession {
val t = s"${catalogAndNamespace}table_name"
withTable(t) {
sql(s"CREATE TABLE $t (id int) USING $v2Format")
- val e = intercept[AnalysisException](sql(s"ALTER TABLE $t ALTER COLUMN id TYPE interval"))
- assert(e.getMessage.contains("id to interval type"))
+ Seq(
+ "interval",
+ "interval year",
+ "interval month",
+ "interval year to month",
+ "interval day",
+ "interval hour",
+ "interval minute",
+ "interval second",
+ "interval day to second",
+ "interval day to minute",
+ "interval day to hour",
+ "interval hour to second",
+ "interval hour to minute",
+ "interval minute to second").foreach { case dtype =>
Review comment:
You can get all year-month and day-time interval types from `DataTypeTestUtils`, see `dayTimeIntervalTypes` and `yearMonthIntervalTypes`. Please, take them, and call `typeName`.
--
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 #32978: [SPARK-35827][SQL] Show proper error message when update column types to year-month/day-time interval
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32978:
URL: https://github.com/apache/spark/pull/32978#issuecomment-864464772
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44551/
--
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