This commit is contained in:
Zoltan Haindrich 2024-11-20 16:30:24 +00:00
parent d4ebca947c
commit 0c6b40c138

View File

@ -20,7 +20,6 @@
package org.apache.druid.sql.calcite.planner;
import com.google.common.collect.ImmutableList;
import org.apache.calcite.plan.RelOptCluster;
import org.apache.calcite.plan.RelOptUtil;
import org.apache.calcite.rel.RelHomogeneousShuttle;
import org.apache.calcite.rel.RelNode;
@ -73,12 +72,9 @@ public class DruidRelFieldTrimmer extends RelFieldTrimmer
protected TrimResult dummyProject(int fieldCount, RelNode input,
@Nullable RelNode originalRelNode)
{
final RelOptCluster cluster = input.getCluster();
final Mapping mapping =
Mappings.create(MappingType.INVERSE_SURJECTION, fieldCount, 0);
final Mapping mapping = Mappings.create(MappingType.INVERSE_SURJECTION, fieldCount, 0);
if (input.getRowType().getFieldCount() == 0) {
// Input already has one field (and may in fact be a dummy project we
// created for the child). We can't do better.
// there is no need to do anything
return result(input, mapping);
}
relBuilder.push(input);