maropu commented on a change in pull request #27288: [SPARK-30579][DOC]
Document ORDER BY Clause of SELECT statement in SQL Reference
URL: https://github.com/apache/spark/pull/27288#discussion_r369924382
##########
File path: docs/sql-ref-syntax-qry-select-orderby.md
##########
@@ -18,5 +18,125 @@ license: |
See the License for the specific language governing permissions and
limitations under the License.
---
+The <code>ORDER BY</code> clause is used to return the result rows in a sorted
manner
+in the user specified order. Unlike the <code>SORT BY</code> clause, this
clause guarantees
+total order in the output.
-**This page is under construction**
+### Syntax
+{% highlight sql %}
+ORDER BY { expression [ sort_direction | nulls_sort_oder ] [ , ...] }
+{% endhighlight %}
+
+### Parameters
+<dl>
+ <dt><code><em>ORDER BY</em></code></dt>
+ <dd>
+ Specifies a comma-separated list of expressions along with optional
parameters <code>sort_direction</code>
+ and <code>nulls_sort_order</code> which are used to sort the rows.
+ </dd>
+ <dt><code><em>sort_direction</em></code></dt>
+ <dd>
+ Optionally specifies whether to sort the rows in ascending (lowest to
highest) or descending
Review comment:
we need the statement `(lowest to highest)`? `ascending or descending` is
enough?
----------------------------------------------------------------
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]