Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8779#discussion_r39936067
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
    @@ -477,6 +477,20 @@ class SQLContext(@transient val sparkContext: 
SparkContext)
       }
     
       /**
    +   * :: DeveloperApi ::
    +   * Creates a [[DataFrame]] from an [[java.util.List]] containing 
[[Row]]s using the given schema.
    +   * It is important to make sure that the structure of every [[Row]] of 
the provided List matches
    +   * the provided schema. Otherwise, there will be runtime exception.
    +   *
    +   * @group dataframes
    +   * @since 1.6.0
    +   */
    +  @DeveloperApi
    +  def createDataFrame(rows: java.util.List[Row], schema: StructType): 
DataFrame = {
    +    createDataFrame(sparkContext.parallelize(rows.asScala), schema)
    --- End diff --
    
    Should create a local DataFrame using `LocalRelation`. See 
https://github.com/holdenk/spark/blob/SPARK-10630-create-DataFrame-from-Java-List/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala#L385.


---
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]

Reply via email to