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

    https://github.com/apache/spark/pull/4127#discussion_r23276780
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -70,9 +71,16 @@ class HiveContext(sc: SparkContext) extends 
SQLContext(sc) {
         if (conf.dialect == "sql") {
           super.sql(sqlText)
         } else if (conf.dialect == "hiveql") {
    -      new SchemaRDD(this, 
ddlParser(sqlText).getOrElse(HiveQl.parseSql(sqlText)))
    -    }  else {
    -      sys.error(s"Unsupported SQL dialect: ${conf.dialect}.  Try 'sql' or 
'hiveql'")
    +      val ddlPlan = ddlParser(sqlText)
    +      val basicPlan = try {
    +        HiveQl.parseSql(sqlText)
    +      } catch {
    +        case e: Exception if ddlPlan.nonEmpty => ddlPlan.get
    +        case e: Throwable => throw e
    +      }
    --- End diff --
    
    @marmbrus  
    I've ever considered this, but not find a good way to resolve it.
    I abstract a logical `DescribeCommand` command to unify 
`HiveDescribeCommand` and `This Describe Command`, and wrap it after parsing. 
    When planning use ddl strategy to distinguish `HiveDescribeCommand` and 
`This Describe Command` according to the context(sqlContext, hiveContext), but 
seems the `package access authorization` doesn't allow put `hive class`  in 
`sql package`.
    It would be nice if you have some good suggestions for 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 [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