HyukjinKwon commented on a change in pull request #28896:
URL: https://github.com/apache/spark/pull/28896#discussion_r444833442



##########
File path: sql/core/src/test/resources/test-data/mixed-types1.csv
##########
@@ -0,0 +1,4 @@
+col_mixed_types
+2012
+1997
+True

Review comment:
       Let's don't bother to create new data file here. You can write the test 
codes as below instead.
   
   ```scala
   withTempPath { path =>
     Seq("col_mixed_types", "2012", "1997", 
"True").toDS.write.text(path.getCanonicalPath)
     val df = spark.read.format("csv")
       .option("header", "true")
       .option("inferSchema", "true")
       .load(path.getCanonicalPath)
   
     assert(data.schema.last == StructField("col_mixed_types", StringType, 
true))
   }
   ```




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



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

Reply via email to