Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SQL][DataFrame] Fix column computability bug. #4519

Closed
wants to merge 2 commits into from

Conversation

rxin
Copy link
Contributor

@rxin rxin commented Feb 11, 2015

Do not recursively strip out projects. Only strip the first level project.

df("colA") + df("colB").as("colC")

Previously, the above would construct an invalid plan.

Do not recursively strip out projects. Only strip the first level project.
@SparkQA
Copy link

SparkQA commented Feb 11, 2015

Test build #27261 has started for PR 4519 at commit 015c4fc.

  • This patch merges cleanly.

private def computableCol(baseCol: ComputableColumn, expr: Expression) = {
val plan = Project(Seq(expr match {
case named: NamedExpression => named
case unnamed: Expression => Alias(unnamed, "col")()
}), baseCol.plan)
}), stripProject(baseCol.plan))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I would consider splitting this up since matching in the constructor is not super easy to read.

@SparkQA
Copy link

SparkQA commented Feb 11, 2015

Test build #27263 has started for PR 4519 at commit 87ff763.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Feb 11, 2015

Test build #27261 has finished for PR 4519 at commit 015c4fc.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27261/
Test FAILed.

@marmbrus
Copy link
Contributor

This passed catalyst/sql/hive tests. The core tests are know flakey. Merging after talking with @pwendell so this can be included in the snapshot.

@marmbrus
Copy link
Contributor

test this please

asfgit pushed a commit that referenced this pull request Feb 11, 2015
Do not recursively strip out projects. Only strip the first level project.

```scala
df("colA") + df("colB").as("colC")
```

Previously, the above would construct an invalid plan.

Author: Reynold Xin <[email protected]>

Closes #4519 from rxin/computability and squashes the following commits:

87ff763 [Reynold Xin] Code review feedback.
015c4fc [Reynold Xin] [SQL][DataFrame] Fix column computability.

(cherry picked from commit 7e24249)
Signed-off-by: Michael Armbrust <[email protected]>
@asfgit asfgit closed this in 7e24249 Feb 11, 2015
@SparkQA
Copy link

SparkQA commented Feb 11, 2015

Test build #27263 has finished for PR 4519 at commit 87ff763.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/27263/
Test PASSed.

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.

4 participants