gianm commented on code in PR #13892:
URL: https://github.com/apache/druid/pull/13892#discussion_r1129884367


##########
sql/src/main/java/org/apache/druid/sql/calcite/rule/DruidCorrelateUnnestRule.java:
##########
@@ -44,134 +51,168 @@
  * This class creates the rule to abide by for creating correlations during 
unnest.
  * Typically, Calcite plans the unnest query such as
  * SELECT * from numFoo, unnest(dim3) in the following way:
+ *
+ * <pre>
  * 80:LogicalCorrelate(correlation=[$cor0], joinType=[inner], 
requiredColumns=[{3}])
  *   6:LogicalTableScan(subset=[rel#74:Subset#0.NONE.[]], table=[[druid, 
numfoo]])
  *   78:Uncollect(subset=[rel#79:Subset#3.NONE.[]])
  *     76:LogicalProject(subset=[rel#77:Subset#2.NONE.[]], 
EXPR$0=[MV_TO_ARRAY($cor0.dim3)])
  *       7:LogicalValues(subset=[rel#75:Subset#1.NONE.[0]], tuples=[[{ 0 }]])
+ * </pre>
  *
- *  {@link DruidUnnestDatasourceRule} takes care of the Uncollect(last 3 
lines) to generate a {@link DruidUnnestDatasourceRel}
- *  thereby reducing the logical plan to:
+ * {@link DruidUnnestRule} takes care of the Uncollect(last 3 lines) to 
generate a {@link DruidUnnestRel}
+ * thereby reducing the logical plan to:
+ * <pre>
  *        LogicalCorrelate
  *           /       \
  *      DruidRel    DruidUnnestDataSourceRel

Review Comment:
   Yep. Updated it.



##########
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/CastOperatorConversion.java:
##########
@@ -76,6 +76,8 @@ public class CastOperatorConversion implements 
SqlOperatorConversion
       builder.put(type, ExprType.LONG);
     }
 
+    builder.put(SqlTypeName.ARRAY, ExprType.ARRAY);

Review Comment:
   Yeah, yours is better. Merged it in. Thanks.



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