Skip to content

Conversation

@beliefer
Copy link
Contributor

What changes were proposed in this pull request?

Except for Postgresql, other data sources (for example: vertica, oracle, redshift, mysql, presto) are not allowed to specify window frame for the Lead and Lag functions.

But the current error message is not clear enough.
Window Frame $f must match the required frame
This PR will use the following error message.
Cannot specify window frame for lead function

Why are the changes needed?

Make clear error message.

Does this PR introduce any user-facing change?

Yes
Users will see the clearer error message.

How was this patch tested?

Jenkins test.

if wf.frame != UnspecifiedFrame && wf.frame != f =>
failAnalysis(s"Window Frame $f must match the required frame ${wf.frame}")
case WindowExpression(owf: OffsetWindowFunction,
WindowSpecDefinition(_, _, _: SpecifiedWindowFrame)) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

OffsetWindowFunction can use UnspecifiedFrame now?

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 got it.

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34329/

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Test build #129723 has finished for PR 30021 at commit a10ae2f.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34329/

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34332/

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Test build #129725 has finished for PR 30021 at commit e3c90cf.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34332/

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Test build #129730 has finished for PR 30021 at commit ab5de89.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34336/

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34336/

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34338/

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/34338/

@SparkQA
Copy link

SparkQA commented Oct 13, 2020

Test build #129732 has finished for PR 30021 at commit e0af70d.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 2b7239e Oct 13, 2020
@beliefer
Copy link
Contributor Author

@cloud-fan Thanks for your help!

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