spark-instrumented-optimizer/sql/hive
Josh Rosen 82268f07ab [SPARK-9293] [SPARK-9813] Analysis should check that set operations are only performed on tables with equal numbers of columns
This patch adds an analyzer rule to ensure that set operations (union, intersect, and except) are only applied to tables with the same number of columns. Without this rule, there are scenarios where invalid queries can return incorrect results instead of failing with error messages; SPARK-9813 provides one example of this problem. In other cases, the invalid query can crash at runtime with extremely confusing exceptions.

I also performed a bit of cleanup to refactor some of those logical operators' code into a common `SetOperation` base class.

Author: Josh Rosen <joshrosen@databricks.com>

Closes #7631 from JoshRosen/SPARK-9293.
2015-08-25 00:04:10 -07:00
..
compatibility/src/test/scala/org/apache/spark/sql/hive/execution [SPARK-9141] [SQL] Remove project collapsing from DataFrame API 2015-08-05 09:01:45 -07:00
src [SPARK-9293] [SPARK-9813] Analysis should check that set operations are only performed on tables with equal numbers of columns 2015-08-25 00:04:10 -07:00
pom.xml [SPARK-8064] [SQL] Build against Hive 1.2.1 2015-08-03 15:24:42 -07:00