From 7eb83fefd19e137d80a23b5174b66b14831c291a Mon Sep 17 00:00:00 2001 From: hyukjinkwon Date: Sun, 21 Feb 2016 13:21:59 -0800 Subject: [SPARK-13137][SQL] NullPoingException in schema inference for CSV when the first line is empty https://issues.apache.org/jira/browse/SPARK-13137 This PR adds a filter in schema inference so that it does not emit NullPointException. Also, I removed `MAX_COMMENT_LINES_IN_HEADER `but instead used a monad chaining with `filter()` and `first()`. Lastly, I simply added a newline rather than adding a new file for this so that this is covered with the original tests. Author: hyukjinkwon Closes #11023 from HyukjinKwon/SPARK-13137. --- sql/core/src/test/resources/cars.csv | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/core/src/test/resources') diff --git a/sql/core/src/test/resources/cars.csv b/sql/core/src/test/resources/cars.csv index 2b9d74ca60..40ded573ad 100644 --- a/sql/core/src/test/resources/cars.csv +++ b/sql/core/src/test/resources/cars.csv @@ -1,3 +1,4 @@ + year,make,model,comment,blank "2012","Tesla","S","No comment", -- cgit v1.2.3