srowen commented on a change in pull request #27289: [SPARK-30581][DOC] 
Document SORT BY Clause of SELECT statement in SQLReference.
URL: https://github.com/apache/spark/pull/27289#discussion_r368606980
 
 

 ##########
 File path: docs/sql-ref-syntax-qry-select-sortby.md
 ##########
 @@ -0,0 +1,172 @@
+---
+layout: global
+title: SORT BY Clause
+displayTitle: SORT BY Clause
+license: |
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+ 
+     http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+---
+The <code>SORT BY</code> clause is used to return the result rows sorted
+within each partition in the user specified order. When there are more than 
one partition
+<code>SORT BY</code> may return results that is partially ordered. This is 
different
+than <code>ORDER BY</code> clause which guarantees total ordering of the 
output.
+
+### Syntax
+{% highlight sql %}
+SORT BY { expression [ sort_direction | nulls_sort_oder ] [ , ...] }
+{% endhighlight %}
+
+### Parameters
+<dl>
+  <dt><code><em>SORT BY</em></code></dt>
+  <dd>
+    Specifies a comma separated list of expression along with optional 
parameters sort_direction 
 
 Review comment:
   comma-separated
   expression -> expresisons
   Back-tick things like `sort_direction`, etc.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to