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

    https://github.com/apache/spark/pull/3470#discussion_r21350936
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala ---
    @@ -37,7 +37,7 @@ import 
org.apache.spark.sql.catalyst.expressions.{Expression, Attribute}
     @DeveloperApi
     trait RelationProvider {
       /** Returns a new base relation with the given parameters. */
    -  def createRelation(sqlContext: SQLContext, parameters: Map[String, 
String]): BaseRelation
    +  def createRelation(sqlContext: SQLContext, parameters: 
CaseInsensitiveMap): BaseRelation
    --- End diff --
    
    1 About ```spark.sql.caseSensitive```, my idea is that we do not need make 
attributes and table names case insensitive, just like hive. Configurable there 
make things complex.  
    2 "You can still pass your CaseInsensitiveMap in and it will have the 
desired effect. Just don't change the function signature."
    You mean like this?
    ```
    class DefaultSource extends RelationProvider {
      /** Returns a new base relation with the given parameters. */
      override def createRelation(
          sqlContext: SQLContext,
          parameters: Map[String, String]): BaseRelation = {
        val path = new CaseInsensitiveMap(parameters)
          .getOrElse("path", sys.error("'path' must be specified for parquet 
tables."))
    
        ParquetRelation2(path)(sqlContext)
      }
    }
    ```


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