Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/8879#discussion_r40403357
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
@@ -531,6 +531,32 @@ class SQLContext(@transient val sparkContext:
SparkContext)
}
/**
+ * Applies a schema to an List of Java Beans.
+ *
+ * WARNING: Since there is no guaranteed ordering for fields in a Java
Bean,
+ * SELECT * queries will return the columns in an undefined
order.
+ * @group dataframes
+ * @since 1.6.0
+ */
+ def createDataFrame(data: java.util.List[_], beanClass: Class[_]):
DataFrame = {
+ val schema = getSchema(beanClass)
--- End diff --
Up to your judgment since you know the details better of course. If it's
not worth the overhead to factor this out then leave it.
---
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]