MaxGekk commented on code in PR #48449:
URL: https://github.com/apache/spark/pull/48449#discussion_r1802491241
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -1341,12 +1341,10 @@ private[sql] object QueryCompilationErrors extends
QueryErrorsBase with Compilat
def parseModeUnsupportedError(funcName: String, mode: ParseMode): Throwable
= {
new AnalysisException(
- errorClass = "_LEGACY_ERROR_TEMP_1099",
+ errorClass = "PARSE_MODE_UNSUPPORTED",
messageParameters = Map(
"funcName" -> funcName,
Review Comment:
Since it is an id, please, quote it:
```suggestion
"funcName" -> toSQLId(funcName),
```
##########
connector/avro/src/main/scala/org/apache/spark/sql/avro/AvroDataToCatalyst.scala:
##########
@@ -123,12 +120,9 @@ private[sql] case class AvroDataToCatalyst(
s"Current parse Mode: ${FailFastMode.name}. To process malformed
records as null " +
"result, try setting the option 'mode' as 'PERMISSIVE'.", e)
case _ =>
- throw new AnalysisException(
- errorClass = "_LEGACY_ERROR_TEMP_3085",
- messageParameters = Map(
- "name" -> parseMode.name,
- "permissiveMode" -> PermissiveMode.name,
- "failFastMode" -> FailFastMode.name))
+ throw QueryCompilationErrors.parseModeUnsupportedError(
+ "from_avro", parseMode
Review Comment:
Please, use `prettyName`
--
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]