Skip to content

Conversation

@hvanhovell
Copy link
Contributor

What changes were proposed in this pull request?

The current subquery expression interface contains a little bit of technical debt in the form of a few different access paths to get and set the query contained by the expression. This is confusing to anyone who goes over this code.

This PR unifies these access paths.

How was this patch tested?

(Existing tests)

# Conflicts:
#	sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala
@hvanhovell
Copy link
Contributor Author

cc @davies (we discussed this in PR #14548)


override def semanticEquals(other: Expression): Boolean = other match {
case s: ScalarSubquery => executedPlan.sameResult(executedPlan)
case s: ScalarSubquery => plan.sameResult(s.plan)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a small bug in sematicEquals.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@SparkQA
Copy link

SparkQA commented Aug 17, 2016

Test build #63916 has finished for PR 14685 at commit d2bd26c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class SubqueryAlias(

@davies
Copy link
Contributor

davies commented Aug 17, 2016

LGTM, merging into master, thanks!

@asfgit asfgit closed this in 0b0c8b9 Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants