public RelOptTable getTableForMember(List<String> names) {
final SqlValidatorTable table = catalogReader.getTable(names);
final RelDataType rowType = table.getRowType();
final List<RelCollation> collationList = deduceMonotonicity(table);
if (names.size() < 3) {
String[] newNames2 = {"CATALOG", "SALES", ""};
List<String> newNames = new ArrayList<>();
int i = 0;
while (newNames.size() < newNames2.length) {
newNames.add(i, newNames2[i]);
++i;
}
names = newNames;
}
return createColumnSet(table, names, rowType, collationList);
}
|