use of com.facebook.presto.sql.planner.plan.ProjectNode in project presto by prestodb.
the class TestTypeValidator method testValidTypeOnlyCoercion.
@Test
public void testValidTypeOnlyCoercion() throws Exception {
Expression expression = new Cast(columnB.toSymbolReference(), StandardTypes.BIGINT);
Assignments assignments = Assignments.builder().put(symbolAllocator.newSymbol(expression, BIGINT), expression).put(symbolAllocator.newSymbol(columnE.toSymbolReference(), VARCHAR), // implicit coercion from varchar(3) to varchar
columnE.toSymbolReference()).build();
PlanNode node = new ProjectNode(newId(), baseTableScan, assignments);
assertTypesValid(node);
}
Aggregations