[
https://issues.apache.org/jira/browse/SPARK-16590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Reynold Xin updated SPARK-16590:
--------------------------------
Fix Version/s: (was: 2.0.1)
(was: 2.1.0)
2.0.0
> Improve LogicalPlanToSQLSuite to check generated SQL directly
> -------------------------------------------------------------
>
> Key: SPARK-16590
> URL: https://issues.apache.org/jira/browse/SPARK-16590
> Project: Spark
> Issue Type: Sub-task
> Components: SQL, Tests
> Reporter: Dongjoon Hyun
> Assignee: Dongjoon Hyun
> Fix For: 2.0.0
>
>
> This issue improves `LogicalPlanToSQLSuite` to check the generated SQL
> directly by *structure*. So far, `LogicalPlanToSQLSuite` relies on
> `checkHiveQl` to ensure the *successful SQL generation* and *answer
> equality*. However, it does not guarantee the generated SQL is the same and
> will not be changed unnoticeably.
> The following is an example result of this issue.
> {code}
> - checkHiveQl("SELECT * FROM parquet_t0 TABLESAMPLE(0.1 PERCENT) WHERE
> 1=0")
> + checkHiveQl("SELECT * FROM parquet_t0 TABLESAMPLE(0.1 PERCENT) WHERE
> 1=0",
> + """
> + |SELECT `gen_attr` AS `id`
> + |FROM (SELECT `gen_attr`
> + | FROM (SELECT `id` AS `gen_attr`
> + | FROM `default`.`parquet_t0`
> + | TABLESAMPLE(0.1 PERCENT))
> + | AS gen_subquery_0
> + | WHERE (1 = 0))
> + | AS parquet_t0
> + """.stripMargin)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]