cloud-fan commented on a change in pull request #30586:
URL: https://github.com/apache/spark/pull/30586#discussion_r536047884



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/CharVarcharTestSuite.scala
##########
@@ -441,49 +438,31 @@ class BasicCharVarcharTestSuite extends QueryTest with 
SharedSparkSession {
     assertNoCharType(sql("SELECT CAST(id AS CHAR(5)) FROM range(1)"))
   }
 
-  test("user-specified schema in functions") {
-    val df = sql("""SELECT from_json('{"a": "str"}', 'a CHAR(5)')""")
-    checkAnswer(df, Row(Row("str")))
-    val schema = df.schema.head.dataType.asInstanceOf[StructType]
-    assert(schema.map(_.dataType) == Seq(StringType))
+  test("invalidate char/varchar in functions") {

Review comment:
       nit: shall we put the test after `def failWithInvalidCharUsage`?




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

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