Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/4298#discussion_r23895731
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
@@ -139,12 +139,13 @@ class DataFrame protected[sql](
* val rdd: RDD[(Int, String)] = ...
* rdd.toDataFrame // this implicit conversion creates a DataFrame
with column name _1 and _2
* rdd.toDataFrame("id", "name") // this creates a DataFrame with
column name "id" and "name"
+ * rdd.toDataFrame("id") // this creates a DataFrame with
only column name "id"
* }}}
*/
@scala.annotation.varargs
def toDataFrame(colName: String, colNames: String*): DataFrame = {
val newNames = colName +: colNames
- require(schema.size == newNames.size,
+ require(schema.size >= newNames.size,
--- End diff --
OK. It is reverted.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]