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

    https://github.com/apache/spark/pull/3431#discussion_r22742665
  
    --- 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 --
    
    Why is this an option?  we have two traits and option is not very friendly 
to java


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