Skip to content

Conversation

@viirya
Copy link
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
Member Author

viirya commented Jul 27, 2017

cc @cloud-fan @gatorsmile

@HyukjinKwon
Copy link
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
Member Author

viirya commented Jul 27, 2017

@HyukjinKwon oh. I see. Thanks.

@SparkQA
Copy link

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