sohardforaname commented on code in PR #21197: URL: https://github.com/apache/doris/pull/21197#discussion_r1257503099
########## fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java: ########## @@ -315,7 +318,36 @@ public PlanFragment visitPhysicalOlapTableSink(PhysicalOlapTableSink<? extends P ); rootFragment.setSink(sink); + rootFragment.setOutputPartition(DataPartition.UNPARTITIONED); + + return rootFragment; + } + + @Override + public PlanFragment visitPhysicalFileSink(PhysicalFileSink<? extends Plan> fileSink, + PlanTranslatorContext context) { + PlanFragment rootFragment = fileSink.child().accept(this, context); + OutFileClause outFile = new OutFileClause( + fileSink.getFilePath(), + fileSink.getFormat(), + fileSink.getProperties() + ); + + List<Expr> outputExprs = Lists.newArrayList(); + fileSink.getOutput().stream().map(Slot::getExprId) + .forEach(exprId -> outputExprs.add(context.findSlotRef(exprId))); + rootFragment.setOutputExprs(outputExprs); + + try { + outFile.analyze(null, outputExprs, + fileSink.getOutput().stream().map(NamedExpression::getName).collect(Collectors.toList())); Review Comment: because the properties' fields is analyzed in the legacy planner's analyze() -- 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