diff options
author | windpiger <songjun@outlook.com> | 2017-02-19 16:50:16 -0800 |
---|---|---|
committer | Xiao Li <gatorsmile@gmail.com> | 2017-02-19 16:50:16 -0800 |
commit | 65fe902e13153ad73a3026a66e73c93393df1abb (patch) | |
tree | 92f595402705f0d3b7d2c1841c6ce1a6da7593de /sql/hive/src | |
parent | 1487c9af20a333ead55955acf4c0aa323bea0d07 (diff) | |
download | spark-65fe902e13153ad73a3026a66e73c93393df1abb.tar.gz spark-65fe902e13153ad73a3026a66e73c93393df1abb.tar.bz2 spark-65fe902e13153ad73a3026a66e73c93393df1abb.zip |
[SPARK-19598][SQL] Remove the alias parameter in UnresolvedRelation
## What changes were proposed in this pull request?
Remove the alias parameter in `UnresolvedRelation`, and use `SubqueryAlias` to replace it.
This can simplify some `match case` situations.
For example, the broadcast hint pull request can have one fewer case https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveHints.scala#L57-L61
## How was this patch tested?
add some unit tests
Author: windpiger <songjun@outlook.com>
Closes #16956 from windpiger/removeUnresolveTableAlias.
Diffstat (limited to 'sql/hive/src')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala index 3267c237c8..fd13911947 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala @@ -483,7 +483,7 @@ private[hive] class TestHiveQueryExecution( // Make sure any test tables referenced are loaded. val referencedTables = describedTables ++ - logical.collect { case UnresolvedRelation(tableIdent, _) => tableIdent.table } + logical.collect { case UnresolvedRelation(tableIdent) => tableIdent.table } val referencedTestTables = referencedTables.filter(sparkSession.testTables.contains) logDebug(s"Query references test tables: ${referencedTestTables.mkString(", ")}") referencedTestTables.foreach(sparkSession.loadTestTable) |