Add PlanBuilder.symbol(name) variant with default type
@@ -68,6 +68,7 @@ import java.util.Optional;
import java.util.function.Consumer;
import java.util.stream.Stream;
+import static com.facebook.presto.spi.type.BigintType.BIGINT;
import static com.facebook.presto.sql.planner.SystemPartitioningHandle.FIXED_HASH_DISTRIBUTION;
import static com.facebook.presto.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION;
import static com.google.common.base.Preconditions.checkArgument;
@@ -418,6 +419,11 @@ public class PlanBuilder
return new UnionNode(idAllocator.getNextId(), (List<PlanNode>) sources, outputsToInputs, outputs);
}
+ public Symbol symbol(String name)
+ {
+ return symbol(name, BIGINT);
+ }
+
public Symbol symbol(String name, Type type)
{
Symbol symbol = new Symbol(name);
