Github user wojtek-szymanski commented on a diff in the pull request: https://github.com/apache/spark/pull/17068#discussion_r104316989 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala --- @@ -305,13 +305,21 @@ class CSVSuite extends QueryTest with SharedSQLContext with SQLTestUtils { test("test with empty file and known schema") { val result = spark.read .format("csv") - .schema(StructType(List(StructField("column", StringType, false)))) + .schema(StructType(List(StructField("column", StringType, nullable = false)))) .load(testFile(emptyFile)) - assert(result.collect.size === 0) + assert(result.collect().isEmpty) assert(result.schema.fieldNames.size === 1) } + test("test with empty file without schema") { --- End diff -- Good idea, done
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org