Fix base column name not present error when dereference pushdown enabled
@@ -338,9 +338,8 @@ public class HiveParquetDereferencePushDown
return visitPlan(project, context);
}
- Map<String, HiveColumnHandle> regularHiveColumnHandles = tableScan.getAssignments().values().stream()
- .map(columnHandle -> (HiveColumnHandle) columnHandle)
- .collect(toMap(HiveColumnHandle::getName, identity()));
+ Map<String, HiveColumnHandle> regularHiveColumnHandles = tableScan.getAssignments().entrySet().stream()
+ .collect(toMap(e -> e.getKey().getName(), e -> (HiveColumnHandle) e.getValue()));
List<VariableReferenceExpression> newOutputVariables = new ArrayList<>(tableScan.getOutputVariables());
Map<VariableReferenceExpression, ColumnHandle> newAssignments = new HashMap<>(tableScan.getAssignments());
