Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5827#discussion_r29507934
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
    @@ -45,6 +48,45 @@ import org.apache.spark.util.Utils
     import org.apache.spark.{Partition, SparkContext}
     
     /**
    + * Currently we support the default dialect named "sql", associated with 
the class
    + * [[DefaultDialect]]
    + *
    + * And we can also provide custom SQL Dialect, for example in Spark SQL 
CLI:
    + * {{{
    + *-- switch to "hiveql" dialect
    + *   spark-sql>SET spark.sql.dialect=hiveql;
    + *   spark-sql>SELECT * FROM src LIMIT 1;
    + *
    + *-- switch to "sql" dialect
    + *   spark-sql>SET spark.sql.dialect=sql;
    + *   spark-sql>SELECT * FROM src LIMIT 1;
    + *
    + *-- register the new SQL dialect
    + *   spark-sql> SET spark.sql.dialect=com.xxx.xxx.SQL99Dialect;
    + *   spark-sql> SELECT * FROM src LIMIT 1;
    + *
    + *-- register the non-exist SQL dialect
    + *   spark-sql> SET spark.sql.dialect=NotExistedClass;
    + *   spark-sql> SELECT * FROM src LIMIT 1;
    + *
    + *-- Exception will be thrown and switch to dialect
    + *-- "sql" (for SQLContext) or 
    + *-- "hiveql" (for HiveContext)
    + * }}}
    + */
    +private[spark] class DefaultDialect extends Dialect {
    +  @transient
    +  protected val sqlParser = {
    +    val catalystSqlParser = new catalyst.SqlParser
    +    new SparkSQLParser(catalystSqlParser.parse)
    --- End diff --
    
    
https://github.com/apache/spark/pull/5827/files#diff-131c27c6a1f59770d738b11f2a4755ecR180


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