cloud-fan commented on code in PR #58413:
URL: https://github.com/apache/spark/pull/58413#discussion_r3916401568


##########
connector/protobuf/src/test/scala/org/apache/spark/sql/protobuf/ProtobufDescriptorFileReadSuite.scala:
##########
@@ -79,6 +80,26 @@ class ProtobufDescriptorFileReadSuite extends 
SharedSparkSession with ProtobufTe
     assert(r)
   }
 
+  test("SPARK-59112: CHAR/VARCHAR descriptor paths use the three-argument 
overload") {
+    withSQLConf(SQLConf.CHAR_VARCHAR_STANDARD_SEMANTICS.key -> "true") {
+      val fileUri = new File(descPath).getCanonicalFile.toURI.toString
+      spark.range(1).selectExpr("CAST(NULL AS BINARY) AS 
value").createOrReplaceTempView("t_pb")

Review Comment:
   **Non-blocking (P2):** This uses only `CAST(NULL AS BINARY)`, so it can pass 
without exercising the new descriptor routing: `ProtobufDataToCatalyst` builds 
its descriptor/deserializer lazily under `nullSafeEval`, and null propagation 
skips that work. Removing the new `FromProtobuf` CHAR/VARCHAR case could 
therefore still leave this assertion green. Could this use a valid non-null 
`SimpleMessageJavaTypes` payload for both CHAR and VARCHAR descriptor 
expressions and assert the decoded fields?



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

Reply via email to