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-6202] [SQL] enable variable substitution on test framework #4930

Closed
wants to merge 4 commits into from

Conversation

adrian-wang
Copy link
Contributor

No description provided.

@SparkQA
Copy link

SparkQA commented Mar 6, 2015

Test build #28333 has started for PR 4930 at commit cf13ad3.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Mar 6, 2015

Test build #28333 has finished for PR 4930 at commit cf13ad3.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • protected[hive] class SubstitutedHiveQLQueryExecution(hql: String)

@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/28333/
Test PASSed.

@chenghao-intel
Copy link
Contributor

LGTM

@yhuai
Copy link
Contributor

yhuai commented Mar 17, 2015

Can you explain the reason that you need to do the change when we already have substitution in HiveContext.sql?

@yhuai
Copy link
Contributor

yhuai commented Mar 17, 2015

Also, add a comment in the code to explain the reason will be great.

@adrian-wang
Copy link
Contributor Author

we should substitute variables in hql to pass the text to parseSql() as a parameter. Hive parser need substituted text. HiveContext.sql() does this but return a DataFrame, while we need a logicalPlan so we cannot reuse that.
Added as comment.

@SparkQA
Copy link

SparkQA commented Mar 18, 2015

Test build #28775 has started for PR 4930 at commit acecf6a.

  • This patch merges cleanly.

// we should substitute variables in hql to pass the text to parseSql() as a parameter.
// Hive parser need substituted text. HiveContext.sql() does this but return a DataFrame,
// while we need a logicalPlan so we cannot reuse that.
protected[hive] class SubstitutedHiveQLQueryExecution(hql: String)
extends this.QueryExecution(HiveQl.parseSql(hql)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you just change this line and do what we have in sql (new VariableSubstitution().substitute(hiveconf, hql))?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but runSqlHive() also require a substituted text for use.

@SparkQA
Copy link

SparkQA commented Mar 18, 2015

Test build #28775 has finished for PR 4930 at commit acecf6a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • protected[hive] class SubstitutedHiveQLQueryExecution(hql: String)

@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/28775/
Test PASSed.

// we should substitute variables in hql to pass the text to parseSql() as a parameter.
// Hive parser need substituted text. HiveContext.sql() does this but return a DataFrame,
// while we need a logicalPlan so we cannot reuse that.
protected[hive] class SubstitutedHiveQLQueryExecution(hql: String)
extends this.QueryExecution(HiveQl.parseSql(hql)) {
def hiveExec() = runSqlHive(hql)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yhuai runSqlHive calls Driver.run directly without do substitution, so we have to substitute for this and QueryExecution both.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems eventually Driver.run will call Driver.compile, which will do the substitution?

Copy link
Contributor

Choose a reason for hiding this comment

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

@adrian-wang how about adding the substitution in HiveContext.runSqlHive or HiveContext.runHive? Then we probably not necessary to change anything in TestHive.

@SparkQA
Copy link

SparkQA commented Mar 20, 2015

Test build #28905 has started for PR 4930 at commit d202e13.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Mar 20, 2015

Test build #28905 has finished for PR 4930 at commit d202e13.

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

@adrian-wang
Copy link
Contributor Author

ping @yhuai

@SparkQA
Copy link

SparkQA commented Mar 23, 2015

Test build #28981 has started for PR 4930 at commit b1d68bf.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Mar 23, 2015

Test build #28982 has started for PR 4930 at commit 2ce590f.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Mar 23, 2015

Test build #28981 has finished for PR 4930 at commit b1d68bf.

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

@SparkQA
Copy link

SparkQA commented Mar 23, 2015

Test build #28982 has finished for PR 4930 at commit 2ce590f.

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

@yhuai
Copy link
Contributor

yhuai commented Mar 23, 2015

LGTM. Is there any Hive query test that we should enable?

@adrian-wang
Copy link
Contributor Author

There is one of "mapjoin_addjar", and I'll add that after I refactor #4586 . So I'd like this one merge first, thanks a lot!

@marmbrus
Copy link
Contributor

Thanks! Merged to master.

@asfgit asfgit closed this in 5ab6e9f Mar 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants