Skip to content

Commit

Permalink
[fix](nereids)fix bug of lost rollup property in create table stateme…
Browse files Browse the repository at this point in the history
…nt (apache#25580)
  • Loading branch information
starocean999 authored Oct 20, 2023
1 parent 26f8c7e commit 2cd22e5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ public LogicalPlan visitCreateTable(CreateTableContext ctx) {
ctx.partitionKeys != null ? visitIdentifierList(ctx.partitionKeys) : null,
ctx.partitions != null ? visitPartitionsDef(ctx.partitions) : null,
desc,
ImmutableList.of(),
ctx.rollupDefs() != null ? visitRollupDefs(ctx.rollupDefs()) : ImmutableList.of(),
properties));
} else if (ctx.AS() != null) {
return new CreateTableCommand(Optional.of(visitQuery(ctx.query())), new CreateTableInfo(
Expand All @@ -1934,7 +1934,7 @@ public LogicalPlan visitCreateTable(CreateTableContext ctx) {
ctx.partitionKeys != null ? visitIdentifierList(ctx.partitionKeys) : null,
ctx.partitions != null ? visitPartitionsDef(ctx.partitions) : null,
desc,
ImmutableList.of(),
ctx.rollupDefs() != null ? visitRollupDefs(ctx.rollupDefs()) : ImmutableList.of(),
properties));
} else {
throw new AnalysisException("Should contain at least one column in a table");
Expand Down Expand Up @@ -2067,7 +2067,7 @@ public Expression visitPartitionValueDef(PartitionValueDefContext ctx) {
}

@Override
public Object visitRollupDefs(RollupDefsContext ctx) {
public List<RollupDefinition> visitRollupDefs(RollupDefsContext ctx) {
return ctx.rollups.stream().map(this::visitRollupDef).collect(Collectors.toList());
}

Expand Down

0 comments on commit 2cd22e5

Please sign in to comment.