private void assertCompatibleColumns(InsertFromSubQueryAnalysis analysis) {
assertThat(analysis.columns().size(), is(analysis.getSubQueryColumns().size()));
for (int i = 0; i < analysis.columns().size(); i++) {
assertThat(analysis.getSubQueryColumns().get(i), instanceOf(DataTypeSymbol.class));
DataTypeSymbol subQueryColumn = (DataTypeSymbol)analysis.getSubQueryColumns().get(i);
Reference insertColumn = analysis.columns().get(i);
assertThat(
subQueryColumn.valueType().isConvertableTo(insertColumn.valueType()),
is(true)
);
}
}