yaooqinn commented on code in PR #41993:
URL: https://github.com/apache/spark/pull/41993#discussion_r1266131725
##########
sql/core/src/test/scala/org/apache/spark/sql/CharVarcharTestSuite.scala:
##########
@@ -1167,4 +1172,31 @@ class DSV2CharVarcharTestSuite extends
CharVarcharTestSuite
}
}
}
+
+ test("SPARK-44414: Fixed matching check for CharType/VarcharType") {
+ Seq("{\"__CHAR_VARCHAR_TYPE_STRING\":\"varchar(80)\"}",
+ "{\"__CHAR_VARCHAR_TYPE_STRING\":\"char(80)\"}").foreach(json => {
+
+ // query
+ val rows = Seq(Row("1", "2"))
+ val metadata = new
MetadataBuilder().withMetadata(Metadata.fromJson(json)).build()
+ val schema = StructType(Seq(
Review Comment:
You shall create `schema` directly with char/varchar, and pass it in to
`createDataFrame`.
--
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]