Skip to content

Conversation

@sharangk
Copy link
Contributor

@sharangk sharangk commented Aug 28, 2019

What changes were proposed in this pull request?

Document SET/REST 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:

SET
image
image

RESET
image

How was this patch tested?

Manual Review and Tested using jykyll build --serve

@sharangk
Copy link
Contributor Author

@dilipbiswal , @gatorsmile , Please review. Thanks

@sharangk
Copy link
Contributor Author

sharangk commented Sep 6, 2019

@dilipbiswal , @huaxingao , @gatorsmile , Could you please review and let me know your comments.


### Syntax
{% highlight sql %}
SET;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the semi colon from the syntax ?

### Syntax
{% highlight sql %}
SET;
SET [ -v ];
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

{% highlight sql %}
SET;
SET [ -v ];
SET property_key[ =property_value ];
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto. Add a space after equal ?


<dl>
<dt><code><em>property_key=property_value</em></code></dt>
<dd>Sets the value of specified property key.</dd>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add that , "The new value overrides any existing value for the specified property key" ?


**This page is under construction**
### Description
Reset all SQLConf properties to the default values. After RESET command, executing SET command will output empty.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we say "Reset all the properties specific to the current session to their default values" ? I would like to remove SQLConf as even non sql properties are being cleared.

@sharangk
Copy link
Contributor Author

@dilipbiswal , Thanks for the review. Resubmitted the PR with updates. Please have a look. Thanks !!!

<dl>
<dt><code><em>property_key=property_value</em></code></dt>
<dd>Sets the value of specified property key.</dd>
<dd>The new value overrides any existing value for the specified property key.</dd>
Copy link
Contributor

Choose a reason for hiding this comment

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

@sharangk This makes it sound like it only supports a update op ? How about the following ?

Sets the value for a given property key. If an old value exists for a given property key, then it gets overridden by the new value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks.

@dilipbiswal
Copy link
Contributor

LGTM - except a minor comment.

@sharangk
Copy link
Contributor Author

@dilipbiswal , Thanks. Handled the review comments.

@dilipbiswal
Copy link
Contributor

LGTM
cc @gatorsmile

@gatorsmile
Copy link
Member

ok to test

Copy link
Member

@gatorsmile gatorsmile left a comment

Choose a reason for hiding this comment

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

LGTM

@SparkQA
Copy link

SparkQA commented Sep 17, 2019

Test build #110827 has finished for PR 25606 at commit 624b1e1.

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

@gatorsmile
Copy link
Member

Thanks! Merged to master.

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