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-30575][DOC] Document HAVING Clause of SELECT statement in SQL Reference #27284

Closed
wants to merge 4 commits into from

Conversation

dilipbiswal
Copy link
Contributor

What changes were proposed in this pull request?

Document HAVING clause of SELECT statement in SQL Reference Guide.

Why are the changes needed?

Currently Spark lacks documentation on the supported SQL constructs causing
confusion among users who sometimes have to look at the code to understand the
usage. This is aimed at addressing this issue.

Does this PR introduce any user-facing change?

Yes.

Before:
There was no documentation for this.

After.
Screen Shot 2020-01-19 at 6 03 52 PM
Screen Shot 2020-01-19 at 6 04 11 PM
Screen Shot 2020-01-19 at 6 04 28 PM

How was this patch tested?

Tested using jykyll build --serve

@SparkQA
Copy link

SparkQA commented Jan 20, 2020

Test build #117047 has finished for PR 27284 at commit 668c94b.

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

<dd>
Specifies any expression that evaluates to a result type <code>boolean</code>. Two or
more expressions may be combined together using comparision operators
('>', '>=', ‘>’, ‘>=’, ‘=’, ‘<’ and ‘<=’, '<=>') and logical operators (AND, NOT, OR).<br><br>
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't look right:
image

+--------+---+

-- `HAVING` clause without a `GROUP BY` clause.
SELECT sum(quantity) AS sum FROM dealer HAVING sum(quantity) > 10;
Copy link
Contributor

Choose a reason for hiding this comment

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

there is an extra space between SELECT and sum

@SparkQA
Copy link

SparkQA commented Jan 20, 2020

Test build #117075 has finished for PR 27284 at commit c54dadd.

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

@SparkQA
Copy link

SparkQA commented Jan 20, 2020

Test build #117084 has finished for PR 27284 at commit 4261159.

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

<dd>
Specifies any expression that evaluates to a result type <code>boolean</code>. Two or
more expressions may be combined together using comparision operators
( <code>></code>, <code>>=</code>, <code>=</code>, <code><</code>, <code><=</code>, <code><=></code> )
Copy link
Member

Choose a reason for hiding this comment

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

Same comment here as in the WHERE docs. Do you need to talk about < etc?

@SparkQA
Copy link

SparkQA commented Jan 20, 2020

Test build #117133 has finished for PR 27284 at commit 9da04d3.

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

@srowen srowen closed this in a6030ef Jan 22, 2020
@srowen
Copy link
Member

srowen commented Jan 22, 2020

Merged to master

@dilipbiswal
Copy link
Contributor Author

Thank you @srowen @huaxingao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants