You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "rangadi (via GitHub)" <gi...@apache.org> on 2023/05/15 17:23:58 UTC

[GitHub] [spark] rangadi commented on a diff in pull request #41075: [SPARK-43361][PROTOBUF] spark-protobuf: allow serde with enum as ints

rangadi commented on code in PR #41075:
URL: https://github.com/apache/spark/pull/41075#discussion_r1194138082


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -2812,4 +2813,18 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase {
         "location" -> toSQLValue(location.toString, StringType),
         "identifier" -> toSQLId(tableId.nameParts)))
   }
+
+  def cannotConvertCatalystValueToProtobufEnumTypeError(
+      sqlColumn: Seq[String],
+      protobufColumn: String,
+      data: String,
+      enumString: String): Throwable = {
+    new AnalysisException(
+      errorClass = "CANNOT_CONVERT_SQL_VALUE_TO_PROTOBUF_ENUM_TYPE",

Review Comment:
   @justaparth we forgot to update core/src/main/resources/error/error-classes.json and docs/sql-error-conditions.md in this PR.
   Don't know how this got merged without failing. 
   Could you send a follow up PR updating those files? Also, it will be better if we verify this error with `checkError()` in unit tests (see similar examples).



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