FailedChanges

Summary

  1. [SPARK-25393][SQL] Adding new function from_csv() (details)
Commit e9af9460bc008106b670abac44a869721bfde42a by hyukjinkwon
[SPARK-25393][SQL] Adding new function from_csv()
## What changes were proposed in this pull request?
The PR adds new function `from_csv()` similar to `from_json()` to parse
columns with CSV strings. I added the following methods:
```Scala def from_csv(e: Column, schema: StructType, options:
Map[String, String]): Column
``` and this signature to call it from Python, R and Java:
```Scala def from_csv(e: Column, schema: String, options:
java.util.Map[String, String]): Column
```
## How was this patch tested?
Added new test suites `CsvExpressionsSuite`, `CsvFunctionsSuite` and sql
tests.
Closes #22379 from MaxGekk/from_csv.
Lead-authored-by: Maxim Gekk <maxim.gekk@databricks.com> Co-authored-by:
Maxim Gekk <max.gekk@gmail.com> Co-authored-by: Hyukjin Kwon
<gurwls223@gmail.com> Co-authored-by: hyukjinkwon <gurwls223@apache.org>
Signed-off-by: hyukjinkwon <gurwls223@apache.org>
The file was modifiedsql/catalyst/pom.xml (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/json/JsonDataSource.scala (diff)
The file was addedsql/core/src/test/resources/sql-tests/inputs/csv-functions.sql
The file was modifiedR/pkg/R/generics.R (diff)
The file was removedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FailureSafeParser.scala
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/UnivocityGenerator.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala (diff)
The file was addedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala
The file was addedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVExprUtils.scala
The file was removedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/UnivocityParser.scala
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVInferSchema.scala (diff)
The file was addedsql/core/src/test/scala/org/apache/spark/sql/CsvFunctionsSuite.scala
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala (diff)
The file was modifiedR/pkg/R/functions.R (diff)
The file was addedsql/core/src/test/resources/sql-tests/results/csv-functions.sql.out
The file was addedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/csv/CSVExprUtilsSuite.scala
The file was removedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVHeaderChecker.scala
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/UnivocityParserSuite.scala (diff)
The file was addedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVOptions.scala
The file was addedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/FailureSafeParser.scala
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVUtils.scala (diff)
The file was addedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ExprUtils.scala
The file was addedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CsvExpressionsSuite.scala
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/functions.scala (diff)
The file was addedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVHeaderChecker.scala
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVFileFormat.scala (diff)
The file was removedsql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVUtilsSuite.scala
The file was removedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVOptions.scala
The file was modifiedR/pkg/tests/fulltests/test_sparkSQL.R (diff)
The file was modifiedR/pkg/NAMESPACE (diff)
The file was modifiedpython/pyspark/sql/functions.py (diff)
The file was addedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/csvExpressions.scala
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVInferSchemaSuite.scala (diff)