if (copyStmt.getColumnList() == null)
toColumns = toTable.getColumns();
else {
toColumns = new ArrayList<>(copyStmt.getColumnList().size());
for (ResultColumn rc : copyStmt.getColumnList()) {
ColumnReference cref = rc.getReference();
Column column = toTable.getColumn(cref.getColumnName());
if (column == null)
throw new NoSuchColumnException(cref.getColumnName(), cref);
toColumns.add(column);
}
}
if (copyStmt.getFilename() != null)
fromFile = new File(copyStmt.getFilename());