Skip to content

Commit

Permalink
remove unuse code
Browse files Browse the repository at this point in the history
  • Loading branch information
seawinde committed Dec 20, 2023
1 parent e7dc430 commit a7660eb
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private void analyzeProperties() {
public void analyzeQuery(ConnectContext ctx) {
// create table as select
NereidsPlanner planner = new NereidsPlanner(ctx.getStatementContext());
// this is for column infer
// this is for expression column name infer when not use alias
LogicalSink<Plan> logicalSink = new UnboundResultSink<>(logicalQuery);
Plan plan = planner.plan(logicalSink, PhysicalProperties.ANY, ExplainLevel.ALL_PLAN);
if (plan.anyMatch(node -> node instanceof OneRowRelation)) {
Expand Down Expand Up @@ -306,8 +306,6 @@ private void getColumns(Plan plan) {
if (!CollectionUtils.isEmpty(simpleColumnDefinitions) && simpleColumnDefinitions.size() != slots.size()) {
throw new AnalysisException("simpleColumnDefinitions size is not equal to the query's");
}
// slots = BindExpression.inferColumnNames(plan).stream()
// .map(NamedExpression::toSlot).collect(Collectors.toList());
Set<String> colNames = Sets.newHashSet();
for (int i = 0; i < slots.size(); i++) {
String colName = CollectionUtils.isEmpty(simpleColumnDefinitions) ? slots.get(i).getName()
Expand Down

0 comments on commit a7660eb

Please sign in to comment.