Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/14132#discussion_r71429222 --- Diff: sql/hive/src/test/resources/sqlgen/broadcast_hint_nested_query_1.sql --- @@ -0,0 +1,7 @@ +-- This file is automatically generated by LogicalPlanToSQLSuite. +SELECT /*+ MAPJOIN(parquet_t0) */ * +FROM (SELECT id tid FROM parquet_t0) T +JOIN (SELECT key uid FROM parquet_t1) U +ON tid=uid +-------------------------------------------------------------------------------- +SELECT `gen_attr` AS `tid`, `gen_attr` AS `uid` FROM (SELECT `gen_attr`, `gen_attr` FROM (SELECT /*+ MAPJOIN(parquet_t0) */ `gen_attr` AS `gen_attr` FROM (SELECT `id` AS `gen_attr` FROM `default`.`parquet_t0`) AS gen_subquery_0) AS T INNER JOIN (SELECT `gen_attr` AS `gen_attr` FROM (SELECT `key` AS `gen_attr`, `value` AS `gen_attr` FROM `default`.`parquet_t1`) AS gen_subquery_1) AS U ON (`gen_attr` = `gen_attr`)) AS gen_subquery_2 --- End diff -- This is wrong, right? If we remove the hint, the output should be like ``` SELECT `gen_attr_86` AS `tid`, `gen_attr_87` AS `uid` FROM (SELECT `gen_attr_86`, `gen_attr_87` FROM (SELECT `gen_attr_13` AS `gen_attr_86` FROM (SELECT `id` AS `gen_attr_13` FROM `default`.`parquet_t0`) AS gen_subquery_0) AS T INNER JOIN (SELECT `gen_attr_88` AS `gen_attr_87` FROM (SELECT `key` AS `gen_attr_88`, `value` AS `gen_attr_89` FROM `default`.`parquet_t1`) AS gen_subquery_1) AS U ON ( `gen_attr_86` = `gen_attr_87` )) AS gen_subquery_2 ```
--- 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