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

    https://github.com/apache/spark/pull/1847#discussion_r16275727
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala ---
    @@ -210,9 +210,19 @@ private[hive] object HiveQl {
       def getAst(sql: String): ASTNode = ParseUtils.findRootNonNullToken((new 
ParseDriver).parse(sql))
     
       /** Returns a LogicalPlan for a given HiveQL string. */
    -  def parseSql(sql: String): LogicalPlan = {
    +  def parseSql(sqlRaw: String): LogicalPlan = {
    +    var sql = sqlRaw
         try {
    -      if (sql.trim.toLowerCase.startsWith("set")) {
    +      // FIXME workaround solution to remove the first comment from the 
sql string
    +      if (sql.startsWith("--")) {
    --- End diff --
    
    Previously, the `CTAS` (Create Table As Select) will be considered as 
native command, and `EXPLAIN` only support the `SELECT`, the changes here is to 
make the `EXPLAIN` supports the native command as well.


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