MaxGekk commented on code in PR #41018:
URL: https://github.com/apache/spark/pull/41018#discussion_r1186902706
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -789,6 +789,23 @@
],
"sqlState" : "21S01"
},
+ "INSUFFICIENT_TABLE_PROPERTY" : {
+ "message" : [
+ "Can't find table property:"
+ ],
+ "subClass" : {
+ "MISSING_KEY" : {
+ "message" : [
+ "<key>."
+ ]
+ },
+ "MISSING_KEY_PART" : {
+ "message" : [
+ "<key>, <totalAmountOfParts> parts are expected..."
Review Comment:
```suggestion
"<key>, <totalAmountOfParts> parts are expected."
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -1033,10 +1033,19 @@ private[sql] object QueryCompilationErrors extends
QueryErrorsBase {
messageParameters = Map("colName" -> colName, "dataType" ->
dataType.toString))
}
- def cannotReadCorruptedTablePropertyError(key: String, details: String =
""): Throwable = {
+ def insufficientTablePropertyError(key: String): Throwable = {
new AnalysisException(
- errorClass = "_LEGACY_ERROR_TEMP_1091",
- messageParameters = Map("key" -> key, "details" -> details))
+ errorClass = "INSUFFICIENT_TABLE_PROPERTY.MISSING_KEY",
+ messageParameters = Map("key" -> toSQLId(key)))
Review Comment:
Don't think we should consider properties as identifiers. How about to wrap
it as a string value by `toSQLValue()`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]