in src/main/java/net/hydromatic/optiq/impl/csv/CsvPushProjectOntoTableRule.java [45:59]
public void onMatch(RelOptRuleCall call) {
final ProjectRel project = call.rel(0);
final CsvTableScan scan = call.rel(1);
int[] fields = getProjectFields(project.getProjects());
if (fields == null) {
// Project contains expressions more complex than just field references.
return;
}
call.transformTo(
new CsvTableScan(
scan.getCluster(),
scan.getTable(),
scan.csvTable,
fields));
}