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

[SPARK-4529] [SQL] support view with column alias #3396

Closed
wants to merge 1 commit into from

Conversation

adrian-wang
Copy link
Contributor

Support view definition like

CREATE VIEW view3(valoo)
TBLPROPERTIES ("fear" = "factor")
AS SELECT upper(value) FROM src WHERE key=86;

[valoo as the alias of upper(value)]. This is missing part of SPARK-4239, for a fully view support.

@SparkQA
Copy link

SparkQA commented Nov 21, 2014

Test build #23703 has started for PR 3396 at commit 4d001d0.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Nov 21, 2014

Test build #23703 has finished for PR 3396 at commit 4d001d0.

  • 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/23703/
Test PASSed.

@chenghao-intel
Copy link
Contributor

Should we also put more test cases into the whitelist?

@@ -380,7 +380,7 @@ private[hive] object HiveQl {
protected def nameExpressions(exprs: Seq[Expression]): Seq[NamedExpression] = {
exprs.zipWithIndex.map {
case (ne: NamedExpression, _) => ne
case (e, i) => Alias(e, s"c_$i")()
case (e, i) => Alias(e, s"_c$i")()
Copy link
Contributor

Choose a reason for hiding this comment

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

What exactly is going on here? Have we been doing this wrong all along? or is this a Hive version specific thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked hive-{0.9.0, 0.12.0, 0.13.1}, they all use _c as the default auto-gen column alias prefix label.

asfgit pushed a commit that referenced this pull request Dec 2, 2014
Support view definition like

CREATE VIEW view3(valoo)
TBLPROPERTIES ("fear" = "factor")
AS SELECT upper(value) FROM src WHERE key=86;

[valoo as the alias of upper(value)]. This is missing part of SPARK-4239, for a fully view support.

Author: Daoyuan Wang <daoyuan.wang@intel.com>

Closes #3396 from adrian-wang/viewcolumn and squashes the following commits:

4d001d0 [Daoyuan Wang] support view with column alias

(cherry picked from commit 4df60a8)
Signed-off-by: Michael Armbrust <michael@databricks.com>
@asfgit asfgit closed this in 4df60a8 Dec 2, 2014
@marmbrus
Copy link
Contributor

marmbrus commented Dec 2, 2014

I went ahead and merged this since it would be nice to have the naming change before 1.2. However, it would be good to follow up and see if there are more tests that can be whitelisted.

@marmbrus
Copy link
Contributor

marmbrus commented Dec 2, 2014

Thanks for working on it!

asfgit pushed a commit that referenced this pull request Dec 30, 2014
This is a follow up of #3396 , just add a test to white list.

Author: Daoyuan Wang <daoyuan.wang@intel.com>

Closes #3826 from adrian-wang/viewtest and squashes the following commits:

f105f68 [Daoyuan Wang] enable view test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants