Github user dilipbiswal commented on a diff in the pull request:
https://github.com/apache/spark/pull/20579#discussion_r176187422
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
---
@@ -719,4 +720,27 @@ object DataSource extends Logging {
}
globPath
}
+
+ /**
+ * Called before writing into a FileFormat based data source to make
sure the
+ * supplied schema is not empty.
+ * @param schema
+ */
+ private def hasEmptySchema(schema: StructType): Unit = {
+ def hasEmptySchemaInternal(schema: StructType): Boolean = {
--- End diff --
You are right @cloud-fan. Given we are raising the error from the function
itself, should i rename it to validateSchema ?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]