paul-rogers commented on code in PR #13404:
URL: https://github.com/apache/druid/pull/13404#discussion_r1091020943


##########
docs/querying/datasource.md:
##########
@@ -334,7 +336,7 @@ Native join datasources have the following properties. All 
are required.
 |`right`|Right-hand datasource. Must be of type `lookup`, `query`, or 
`inline`. Note that this is more rigid than what Druid SQL requires.|
 |`rightPrefix`|String prefix that will be applied to all columns from the 
right-hand datasource, to prevent them from colliding with columns from the 
left-hand datasource. Can be any string, so long as it is nonempty and is not 
be a prefix of the string `__time`. Any columns from the left-hand side that 
start with your `rightPrefix` will be shadowed. It is up to you to provide a 
prefix that will not shadow any important columns from the left side.|
 |`condition`|[Expression](../misc/math-expr.md) that must be an equality where 
one side is an expression of the left-hand side, and the other side is a simple 
column reference to the right-hand side. Note that this is more rigid than what 
Druid SQL requires: here, the right-hand reference must be a simple column 
reference; in SQL it can be an expression.|
-|`joinType`|`INNER` or `LEFT`.|
+|`joinType`|`INNER`, `LEFT`|
 

Review Comment:
   In Druid,`LEFT` is a more generic term for `OUTER`. `OUTER` meant "LEFT 
OUTER" in older versions of SQL. So, the term "RIGHT OUTER" had to be 
introduced. Given that, it seems modern syntax omits "OUTER" to give just 
`LEFT` and `RIGHT`. Reference: [left 
join](https://www.w3schools.com/sql/sql_join_left.asp), [right 
join](https://www.w3schools.com/sql/sql_join_right.asp).
   
   However, [this reference](https://mode.com/sql-tutorial/sql-outer-joins/) 
says, "FULL OUTER JOIN is also refered to as OUTER JOIN." which didn't used to 
be true on many databases.
   
   Checking the code (`Parser.jj`) finds that, in the Calcite dialect, `OUTER` 
is synonymous with `LEFT`.



##########
docs/querying/datasource.md:
##########
@@ -302,12 +302,14 @@ use join datasources.
 SQL joins take the form:
 
 ```
-<o1> [ INNER | LEFT [OUTER] ] JOIN <o2> ON <condition>
+<o1> [ [ INNER | LEFT [OUTER] JOIN ON ] | CROSS JOIN <o2> 

Review Comment:
   Given multiple conditions, I'd go back to the original, simpler format, then 
use the explanation to say which combinations are not allowed.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to