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

    https://github.com/apache/spark/pull/11563#discussion_r55260262
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/SQLBuilder.scala ---
    @@ -297,6 +322,31 @@ class SQLBuilder(logicalPlan: LogicalPlan, sqlContext: 
SQLContext) extends Loggi
         )
       }
     
    +  /* This function handles the SQL generation when generators are 
specified in the
    +   * LATERAL VIEW clause. SQL generation of generators specified in 
projection lists
    +   * are handled in projectToSQL.
    +   * sample plan :
    +   *   +- Project [mycol2#192]
    +   *     +- Generate explode(myCol#191), true, false, Some(mytable2), 
[mycol2#192]
    +   *       +- Generate explode(array(array(1, 2, 3))), true, false, 
Some(mytable), [mycol#191]
    +   *         +- MetastoreRelation default, src, None
    +   *
    +   */
    +  private def generateToSQL(plan: Generate): String = {
    +    val columnAliases = plan.generatorOutput.map(a => 
quoteIdentifier(a.name)).mkString(",")
    +    val generatorAlias = if (plan.qualifier.isEmpty) "" else 
plan.qualifier.get
    +    val outerClause = if (plan.outer) "OUTER" else ""
    +    build(
    +      toSQL(plan.child),
    +      "LATERAL VIEW ",
    --- End diff --
    
    ```
    "LATERAL VIEW "
    ```
    ->
    ```
    "LATERAL VIEW"
    ```


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