taptao commented on code in PR #48537:
URL: https://github.com/apache/doris/pull/48537#discussion_r1999064183


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -1694,7 +1694,13 @@ protected LogicalPlan withGenerate(LogicalPlan plan, 
LateralViewContext ctx) {
         // if later view explode map type, we need to add a project to convert 
map to struct
         String columnName = ctx.columnNames.get(0).getText();
         List<String> expandColumnNames = Lists.newArrayList();
-        if (ctx.columnNames.size() > 1) {
+
+        // explode can pass multiple columns
+        // then use struct to return the result of the expansion of multiple 
columns.
+        String funcName = ctx.functionName.getText().toLowerCase();
+        if (ctx.columnNames.size() > 1 || (funcName.equals("explode")
+                || funcName.equals("explode_outer")
+                || funcName.equals("explode_variant_array"))) {

Review Comment:
   done



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -1694,7 +1694,13 @@ protected LogicalPlan withGenerate(LogicalPlan plan, 
LateralViewContext ctx) {
         // if later view explode map type, we need to add a project to convert 
map to struct
         String columnName = ctx.columnNames.get(0).getText();
         List<String> expandColumnNames = Lists.newArrayList();

Review Comment:
   done



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/generator/ExplodeOuter.java:
##########


Review Comment:
   done



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to