Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/18865#discussion_r137741691
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/json/JsonFileFormat.scala
---
@@ -113,6 +113,18 @@ class JsonFileFormat extends TextBasedFileFormat with
DataSourceRegister {
}
}
+ if (requiredSchema.length == 1 &&
+ requiredSchema.head.name == parsedOptions.columnNameOfCorruptRecord)
{
+ throw new AnalysisException(
+ s"'${parsedOptions.columnNameOfCorruptRecord}' cannot be selected
alone without other " +
--- End diff --
This line and the follow ling are concatenated and maybe too long. Add a
`\n` in the end of this line?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]