maropu commented on a change in pull request #28121: [SPARK-31348][SQL][DOCS]
Document Join in SQL Reference
URL: https://github.com/apache/spark/pull/28121#discussion_r404458324
##########
File path: docs/sql-ref-syntax-qry-select-join.md
##########
@@ -18,5 +18,236 @@ license: |
See the License for the specific language governing permissions and
limitations under the License.
---
+### Description
-**This page is under construction**
+A SQL join is used to combine rows from two relations based on join criteria.
The following section describes the overall join syntax and the sub-sections
cover different types of joins along with examples.
+
+### Syntax
+{% highlight sql %}
+
+relation { [ join_type ] JOIN relation [ join_criteria ] | NATURAL join_type
JOIN relation }
+
+{% endhighlight %}
+
+### Parameters
+<dl>
+ <dt><code><em>relation</em></code></dt>
+ <dd>
+ Specifies the relation to be joined.
+ </dd>
+ <dt><code><em>join_type</em></code></dt>
+ <dd>
+ Specifies the join type.<br><br>
+ <b>Syntax:</b><br>
+ <code>
+ [ INNER ]
+ | CROSS
+ | LEFT [ OUTER ]
+ | [ LEFT ] SEMI
+ | RIGHT [ OUTER ]
+ | FULL [ OUTER ]
+ | [ LEFT ] ANTI
+ </code>
+ </dd>
+ <dt><code><em>join_criteria</em></code></dt>
+ <dd>
+ Specifies how the rows from one relation will be combined with the rows of
another relation.<br><br>
+ <b>Syntax:</b>
+ <code>
+ ON boolean_expression | USING ( column_name [ , column_name ... ] )
+ </code> <br><br>
+ <code>boolean_expression</code><br>
+ Specifies an expression with a return type of boolean.
Review comment:
nit: the format?
```
<dd>
Specifies how the rows from one relation will be combined with the rows
of another relation.<br><br>
<b>Syntax:</b>
<code>
ON boolean_expression | USING ( column_name [ , column_name ... ] )
</code> <br><br>
<code>boolean_expression</code><br>
Specifies an expression with a return type of boolean.
...
```
----------------------------------------------------------------
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]