diff options
author | petermaxlee <petermaxlee@gmail.com> | 2016-08-20 13:19:38 +0800 |
---|---|---|
committer | Wenchen Fan <wenchen@databricks.com> | 2016-08-20 13:19:38 +0800 |
commit | 45d40d9f66c666eec6df926db23937589d67225d (patch) | |
tree | 30ca4c1958edf9dacea767e4a7ca6bfa48a74d77 /sql/hive/src/test/resources/sqlgen | |
parent | ba1737c21aab91ff3f1a1737aa2d6b07575e36a3 (diff) | |
download | spark-45d40d9f66c666eec6df926db23937589d67225d.tar.gz spark-45d40d9f66c666eec6df926db23937589d67225d.tar.bz2 spark-45d40d9f66c666eec6df926db23937589d67225d.zip |
[SPARK-17150][SQL] Support SQL generation for inline tables
## What changes were proposed in this pull request?
This patch adds support for SQL generation for inline tables. With this, it would be possible to create a view that depends on inline tables.
## How was this patch tested?
Added a test case in LogicalPlanToSQLSuite.
Author: petermaxlee <petermaxlee@gmail.com>
Closes #14709 from petermaxlee/SPARK-17150.
Diffstat (limited to 'sql/hive/src/test/resources/sqlgen')
-rw-r--r-- | sql/hive/src/test/resources/sqlgen/inline_tables.sql | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/hive/src/test/resources/sqlgen/inline_tables.sql b/sql/hive/src/test/resources/sqlgen/inline_tables.sql new file mode 100644 index 0000000000..602551e69d --- /dev/null +++ b/sql/hive/src/test/resources/sqlgen/inline_tables.sql @@ -0,0 +1,4 @@ +-- This file is automatically generated by LogicalPlanToSQLSuite. +select * from values ("one", 1), ("two", 2), ("three", null) as data(a, b) where b > 1 +-------------------------------------------------------------------------------- +SELECT `gen_attr_0` AS `a`, `gen_attr_1` AS `b` FROM (SELECT `gen_attr_0`, `gen_attr_1` FROM (VALUES ("one", 1), ("two", 2), ("three", CAST(NULL AS INT)) AS gen_subquery_0(gen_attr_0, gen_attr_1)) AS data WHERE (`gen_attr_1` > 1)) AS data |