Skip to content

[SPARK-21538][SQL] Fix attribute resolution inconsistency in Dataset API#18744

Closed
viirya wants to merge 1 commit into
apache:masterfrom
viirya:SPARK-21538
Closed

[SPARK-21538][SQL] Fix attribute resolution inconsistency in Dataset API#18744
viirya wants to merge 1 commit into
apache:masterfrom
viirya:SPARK-21538

Conversation

@viirya
Copy link
Copy Markdown
Member

@viirya viirya commented Jul 27, 2017

What changes were proposed in this pull request?

Given a string column name, the following operation fails with an AnalysisException:

spark.range(1).withColumnRenamed("id", "x").sort("id")

However, the other APIs work:

spark.range(1).withColumnRenamed("id", "x").sort(col("id"))
spark.range(1).withColumnRenamed("id", "x").sort($"id")
spark.range(1).withColumnRenamed("id", "x").sort('id)

This sort API should defer attribute resolution to analysis.

How was this patch tested?

Added unit test.

@viirya
Copy link
Copy Markdown
Member Author

viirya commented Jul 27, 2017

cc @cloud-fan @gatorsmile

@HyukjinKwon
Copy link
Copy Markdown
Member

@viirya, it looks something is wrong with JIRA and somewhere executing dev/github_jira_sync.py. It looks #18740 was already submitted

@viirya
Copy link
Copy Markdown
Member Author

viirya commented Jul 27, 2017

@HyukjinKwon oh. I see. Thanks.

@SparkQA
Copy link
Copy Markdown

SparkQA commented Jul 27, 2017

Test build #79986 has finished for PR 18744 at commit 6364bb0.

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

@viirya viirya deleted the SPARK-21538 branch December 27, 2023 18:34
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