johnImply commented on code in PR #13404: URL: https://github.com/apache/druid/pull/13404#discussion_r1089577792
########## 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: Fyi I just remembered, RIGHT [OUTER] join syntax works as well. Not widely used since SQL tends to read from left to right, but it's in the ANSI standard, and Druid SQL appears to be accepting it: I'm not sure how the brackets work with "requires one of set" vs "optional", so here are the combinations to merge: t1 INNER JOIN t2 ON t1 LEFT [ OUTER ] JOIN t2 ON t1 RIGHT [ OUTER ] JOIN t2 ON t1 CROSS JOIN t2 ########## 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: Add 'RIGHT' ? But I notice in the descriptive paragraph you are using 'left' and right' to indicate the driving and joining tables ... unfortunately that might all need to change to accommodate the LEFT and RIGHT JOIN modes. Sorry for opening up a rats nest here ... -- 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]
