Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14132#discussion_r71203247
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala
 ---
    @@ -755,4 +755,243 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest 
with SQLTestUtils {
           checkHiveQl("select * from orc_t")
         }
       }
    +
    +  test("broadcast hint on single table") {
    +    checkGeneratedSQL(
    +      "SELECT /*+ MAPJOIN(parquet_t0) */ * FROM parquet_t0",
    +      """
    +        |SELECT `gen_attr` AS `id`
    +        |FROM (SELECT /*+ MAPJOIN(parquet_t0) */ `gen_attr`
    +        |      FROM (SELECT `id` AS `gen_attr`
    +        |            FROM `default`.`parquet_t0`)
    +        |            AS gen_subquery_0)
    +        |      AS parquet_t0
    +        |""".stripMargin)
    +
    +    checkGeneratedSQL(
    +      "SELECT /*+ MAPJOIN(parquet_t0, parquet_t0) */ * FROM parquet_t0",
    +      """
    +        |SELECT `gen_attr` AS `id`
    +        |FROM (SELECT /*+ MAPJOIN(parquet_t0) */ `gen_attr`
    +        |      FROM (SELECT `id` AS `gen_attr`
    +        |            FROM `default`.`parquet_t0`)
    +        |            AS gen_subquery_0)
    +        |      AS parquet_t0
    +        |""".stripMargin)
    +
    +    checkGeneratedSQL(
    +      "SELECT /*+ MAPJOIN(parquet_t0) */ * FROM parquet_t0 as a",
    +      """
    +        |SELECT `gen_attr` AS `id`
    +        |FROM (SELECT /*+ MAPJOIN(parquet_t0) */ `gen_attr`
    +        |      FROM ((SELECT `id` AS `gen_attr`
    +        |             FROM `default`.`parquet_t0`)
    +        |             AS gen_subquery_0)
    +        |            AS a)
    +        |      AS a
    +      """.stripMargin)
    +
    +    checkGeneratedSQL(
    +      """
    +        |SELECT /*+ MAPJOIN(parquet_t0) */ *
    --- End diff --
    
    It's beyond the scope of this PR.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to