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

    https://github.com/apache/spark/pull/3431#discussion_r22754925
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala ---
    @@ -46,6 +46,33 @@ trait RelationProvider {
     
     /**
      * ::DeveloperApi::
    + * Implemented by objects that produce relations for a specific kind of 
data source.  When
    + * Spark SQL is given a DDL operation with
    + * 1. USING clause: to specify the implemented SchemaRelationProvider
    + * 2. User defined schema: users can define schema optionally when create 
table
    + *
    + * Users may specify the fully qualified class name of a given data 
source.  When that class is
    + * not found Spark SQL will append the class name `DefaultSource` to the 
path, allowing for
    + * less verbose invocation.  For example, 'org.apache.spark.sql.json' 
would resolve to the
    + * data source 'org.apache.spark.sql.json.DefaultSource'
    + *
    + * A new instance of this class with be instantiated each time a DDL call 
is made.
    + */
    +@DeveloperApi
    +trait SchemaRelationProvider {
    +  /**
    +   * Returns a new base relation with the given parameters and user 
defined schema.
    +   * Note: the parameters' keywords are case insensitive and this 
insensitivity is enforced
    +   * by the Map that is passed to the function.
    +   */
    +  def createRelation(
    +      sqlContext: SQLContext,
    +      parameters: Map[String, String],
    +      schema: Option[StructType]): BaseRelation
    --- End diff --
    
    My initial idea is to compatible with the old traits, since we will have 
two traits i will fix this.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to