Skip to content

Conversation

@yaooqinn
Copy link
Member

What changes were proposed in this pull request?

Similar to #26905

spark-sql> select percentile(1, null);
19/12/19 16:35:04 ERROR SparkSQLDriver: Failed in [select percentile(1, null)]
scala.MatchError: null


spark-sql> select percentile(1, array(0.0, null)); -- null is illegal but treat as zero

Why are the changes needed?

bugfix

Does this PR introduce any user-facing change?

yes, select percentile(1, null); throws AnalysisException instead.

How was this patch tested?

add ut

@yaooqinn
Copy link
Member Author

cc @cloud-fan the problem of percentile is similar to percentile_approx

@SparkQA
Copy link

SparkQA commented Dec 19, 2019

Test build #115552 has finished for PR 26947 at commit e0e0591.

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

@SparkQA
Copy link

SparkQA commented Dec 19, 2019

Test build #115571 has finished for PR 26947 at commit be330eb.

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

@srowen
Copy link
Member

srowen commented Dec 19, 2019

Let's fix it in one JIRA/PR if they're this related

@dongjoon-hyun
Copy link
Member

+1 for @srowen 's advice.

@maropu
Copy link
Member

maropu commented Dec 20, 2019

+1, too, for easy-to-reviews.

@yaooqinn
Copy link
Member Author

merged to #26905, thanks for your suggestions.

@yaooqinn yaooqinn closed this Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants