Skip to content

Instantly share code, notes, and snippets.

@masayuki038
Created November 9, 2019 12:53
Show Gist options
  • Save masayuki038/8a340b7c2a9e9646541c903008e45416 to your computer and use it in GitHub Desktop.
Save masayuki038/8a340b7c2a9e9646541c903008e45416 to your computer and use it in GitHub Desktop.
@Override
public void onMatch(RelOptRuleCall call) {
LogicalProject project = call.rel(0);
AvroTableScan scan = call.rel(1);
Integer[] fields = getProjectFields(project.getProjects());
call.transformTo(
new AvroTableScan(scan.getCluster(), scan.getTable(), fields)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment