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-17751] [SQL] [Backport-2.0] Remove spark.sql.eagerAnalysis and Output the Plan if Existed in AnalysisException #15529

Closed
wants to merge 1 commit into from

Conversation

gatorsmile
Copy link
Member

What changes were proposed in this pull request?

This PR is to backport the fix #15316 to 2.0.

Dataset always does eager analysis now. Thus, spark.sql.eagerAnalysis is not used any more. Thus, we need to remove it.

This PR also outputs the plan. Without the fix, the analysis error is like

cannot resolve '`k1`' given input columns: [k, v]; line 1 pos 12

After the fix, the analysis error becomes:

org.apache.spark.sql.AnalysisException: cannot resolve '`k1`' given input columns: [k, v]; line 1 pos 12;
'Project [unresolvedalias(CASE WHEN ('k1 = 2) THEN 22 WHEN ('k1 = 4) THEN 44 ELSE 0 END, None), v#6]
+- SubqueryAlias t
   +- Project [_1#2 AS k#5, _2#3 AS v#6]
      +- LocalRelation [_1#2, _2#3]

How was this patch tested?

N/A

@gatorsmile
Copy link
Member Author

cc @hvanhovell @cloud-fan

@SparkQA
Copy link

SparkQA commented Oct 18, 2016

Test build #67115 has finished for PR 15529 at commit ebc6f73.

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

@cloud-fan
Copy link
Contributor

LGTM

@rxin
Copy link
Contributor

rxin commented Oct 18, 2016

Merging in.

asfgit pushed a commit that referenced this pull request Oct 18, 2016
…utput the Plan if Existed in AnalysisException

### What changes were proposed in this pull request?
This PR is to backport the fix #15316 to 2.0.

Dataset always does eager analysis now. Thus, `spark.sql.eagerAnalysis` is not used any more. Thus, we need to remove it.

This PR also outputs the plan. Without the fix, the analysis error is like
```
cannot resolve '`k1`' given input columns: [k, v]; line 1 pos 12
```

After the fix, the analysis error becomes:
```
org.apache.spark.sql.AnalysisException: cannot resolve '`k1`' given input columns: [k, v]; line 1 pos 12;
'Project [unresolvedalias(CASE WHEN ('k1 = 2) THEN 22 WHEN ('k1 = 4) THEN 44 ELSE 0 END, None), v#6]
+- SubqueryAlias t
   +- Project [_1#2 AS k#5, _2#3 AS v#6]
      +- LocalRelation [_1#2, _2#3]
```

### How was this patch tested?
N/A

Author: gatorsmile <[email protected]>

Closes #15529 from gatorsmile/eagerAnalysis20.
@rxin
Copy link
Contributor

rxin commented Oct 18, 2016

Can you close the ticket?

@gatorsmile
Copy link
Member Author

Thanks! Close it now

@gatorsmile gatorsmile closed this Oct 18, 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.

4 participants