gengliangwang commented on a change in pull request #24806: 
[WIP][SPARK-27856][SQL] Only allow type upcasting when inserting table
URL: https://github.com/apache/spark/pull/24806#discussion_r292774456
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/DataSourceV2AnalysisSuite.scala
 ##########
 @@ -290,15 +290,14 @@ abstract class DataSourceV2AnalysisSuite extends 
AnalysisTest {
       StructField("y", DoubleType))).toAttributes)
 
     val query = TestRelation(StructType(Seq(
-      StructField("x", DoubleType),
+      StructField("x", FloatType),
 
 Review comment:
   In this test case, the error message `"Cannot safely cast", "'x'", 
"DoubleType to FloatType"` is gone after code changes.
   So I think we should make the test case simpler. The nullability error in 
the `x` column is enough.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to