You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2023/05/25 07:23:49 UTC
[GitHub] [spark] panbingkun opened a new pull request, #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
panbingkun opened a new pull request, #41309:
URL: https://github.com/apache/spark/pull/41309
### What changes were proposed in this pull request?
The pr aims to assign a name to the error class _LEGACY_ERROR_TEMP_1336.
### Why are the changes needed?
The changes improve the error framework.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Update existed UT.
Pass GA.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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] panbingkun commented on a diff in pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #41309:
URL: https://github.com/apache/spark/pull/41309#discussion_r1205168609
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -2977,15 +2977,15 @@ class DataSourceV2SQLSuiteV1Filter
exception = intercept[AnalysisException] {
sql("SELECT * FROM parquet.`/the/path` VERSION AS OF 1")
},
- errorClass = "_LEGACY_ERROR_TEMP_1336",
+ errorClass = "UNSUPPORTED_FEATURE.TIME_TRAVEL",
sqlState = None,
parameters = Map("target" -> "path-based tables"))
Review Comment:
Ok, let me do 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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] panbingkun commented on a diff in pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #41309:
URL: https://github.com/apache/spark/pull/41309#discussion_r1205154713
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -2117,6 +2117,11 @@
"Table <tableName> does not support <operation>. Please check the current catalog and namespace to make sure the qualified table name is expected, and also check the catalog implementation which is configured by \"spark.sql.catalog\"."
]
},
+ "TIME_TRAVEL" : {
+ "message" : [
+ "Time travel on: <target>"
Review Comment:
Very good proposal, let me do 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on PR #41309:
URL: https://github.com/apache/spark/pull/41309#issuecomment-1563871802
+1, LGTM. Merging to master.
Thank you, @panbingkun.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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] panbingkun commented on a diff in pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #41309:
URL: https://github.com/apache/spark/pull/41309#discussion_r1205151416
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -2977,15 +2977,15 @@ class DataSourceV2SQLSuiteV1Filter
exception = intercept[AnalysisException] {
sql("SELECT * FROM parquet.`/the/path` VERSION AS OF 1")
},
- errorClass = "_LEGACY_ERROR_TEMP_1336",
+ errorClass = "UNSUPPORTED_FEATURE.TIME_TRAVEL",
sqlState = None,
parameters = Map("target" -> "path-based tables"))
Review Comment:
My first private version was like this:
<img width="321" alt="image" src="https://github.com/apache/spark/assets/15246973/7cb5d949-7a05-4f4c-a49c-ea91860ddeb9">
But I feel that these subclasses only have different target types for operation, and these types can be extracted, I have my doubts.
Would the above version be better? @MaxGekk
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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] panbingkun commented on a diff in pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #41309:
URL: https://github.com/apache/spark/pull/41309#discussion_r1206157051
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewTestSuite.scala:
##########
Review Comment:
After the pr, I will refactor `SQLViewTestSuite` to use checkError check `Exception`.
Because there is a lot of use of `assert(ex.getMessage.contains(` to check `Exception` in this.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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] panbingkun commented on a diff in pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #41309:
URL: https://github.com/apache/spark/pull/41309#discussion_r1205151416
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -2977,15 +2977,15 @@ class DataSourceV2SQLSuiteV1Filter
exception = intercept[AnalysisException] {
sql("SELECT * FROM parquet.`/the/path` VERSION AS OF 1")
},
- errorClass = "_LEGACY_ERROR_TEMP_1336",
+ errorClass = "UNSUPPORTED_FEATURE.TIME_TRAVEL",
sqlState = None,
parameters = Map("target" -> "path-based tables"))
Review Comment:
My first private version was like this:
<img width="321" alt="image" src="https://github.com/apache/spark/assets/15246973/7cb5d949-7a05-4f4c-a49c-ea91860ddeb9">
But I feel that these subclasses only have different target types for operation, and these types can be extracted, I have my doubts.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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] panbingkun commented on a diff in pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on code in PR #41309:
URL: https://github.com/apache/spark/pull/41309#discussion_r1205151416
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -2977,15 +2977,15 @@ class DataSourceV2SQLSuiteV1Filter
exception = intercept[AnalysisException] {
sql("SELECT * FROM parquet.`/the/path` VERSION AS OF 1")
},
- errorClass = "_LEGACY_ERROR_TEMP_1336",
+ errorClass = "UNSUPPORTED_FEATURE.TIME_TRAVEL",
sqlState = None,
parameters = Map("target" -> "path-based tables"))
Review Comment:
My first private version was like this:
<img width="321" alt="image" src="https://github.com/apache/spark/assets/15246973/7cb5d949-7a05-4f4c-a49c-ea91860ddeb9">
But I feel that these subclasses only have different target types for operation, and these types can be extracted, I have my doubts.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 diff in pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #41309:
URL: https://github.com/apache/spark/pull/41309#discussion_r1205159776
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -2977,15 +2977,15 @@ class DataSourceV2SQLSuiteV1Filter
exception = intercept[AnalysisException] {
sql("SELECT * FROM parquet.`/the/path` VERSION AS OF 1")
},
- errorClass = "_LEGACY_ERROR_TEMP_1336",
+ errorClass = "UNSUPPORTED_FEATURE.TIME_TRAVEL",
sqlState = None,
parameters = Map("target" -> "path-based tables"))
Review Comment:
Don't think all those words are useful for users. How about to show just table/view id like:
```json
"TIME_TRAVEL" : {
"message" : [
"Time travel on the relation: <relationId>."
```
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 diff in pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk commented on code in PR #41309:
URL: https://github.com/apache/spark/pull/41309#discussion_r1205128431
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -2117,6 +2117,11 @@
"Table <tableName> does not support <operation>. Please check the current catalog and namespace to make sure the qualified table name is expected, and also check the catalog implementation which is configured by \"spark.sql.catalog\"."
]
},
+ "TIME_TRAVEL" : {
+ "message" : [
+ "Time travel on: <target>"
Review Comment:
Wouldn't be more helpful for users to show some id of the target (table name, for instance) instead of the generic string `path-based tables`? This could help in troubleshooting the issue.
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala:
##########
@@ -2977,15 +2977,15 @@ class DataSourceV2SQLSuiteV1Filter
exception = intercept[AnalysisException] {
sql("SELECT * FROM parquet.`/the/path` VERSION AS OF 1")
},
- errorClass = "_LEGACY_ERROR_TEMP_1336",
+ errorClass = "UNSUPPORTED_FEATURE.TIME_TRAVEL",
sqlState = None,
parameters = Map("target" -> "path-based tables"))
Review Comment:
Have you considered to introduce sub-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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
Posted by "MaxGekk (via GitHub)" <gi...@apache.org>.
MaxGekk closed pull request #41309: [SPARK-43791][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_1336
URL: https://github.com/apache/spark/pull/41309
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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