}
private static List<Column> createColumnsList(QueryInfo queryInfo)
{
checkNotNull(queryInfo, "queryInfo is null");
StageInfo outputStage = queryInfo.getOutputStage();
if (outputStage == null) {
checkNotNull(outputStage, "outputStage is null");
}
List<String> names = queryInfo.getFieldNames();
ArrayList<Type> types = new ArrayList<>();
for (TupleInfo tupleInfo : outputStage.getTupleInfos()) {
types.add(tupleInfo.getType());
}
checkArgument(names.size() == types.size(), "names and types size mismatch");