Github user MaxGekk commented on a diff in the pull request:
https://github.com/apache/spark/pull/20894#discussion_r188558354
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVOptions.scala
---
@@ -153,6 +153,12 @@ class CSVOptions(
val samplingRatio =
parameters.get("samplingRatio").map(_.toDouble).getOrElse(1.0)
+ /**
+ * Forcibly apply the specified or inferred schema to datasource files.
+ * If the option is enabled, headers of CSV files will be ignored.
+ */
+ val enforceSchema = getBool("enforceSchema", true)
--- End diff --
Initially, it was `checkHeader` (see
https://github.com/apache/spark/pull/20894/commits/9b1a9862531b8d3fb3cffce75126413ca9a844b9#diff-eb708fbebdf6d20d1ab1b109f5f2cd56R153)
but @rxin proposed another names `enforceSchema` or `enforceHeaders `, and I
renamed it to `enforceSchema`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]