You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/08/05 13:47:58 UTC
[GitHub] [calcite] jinxing64 commented on a change in pull request #1355:
[CALCITE-3228] Error while applying rule ProjectScanRule: interpreter
jinxing64 commented on a change in pull request #1355: [CALCITE-3228] Error while applying rule ProjectScanRule: interpreter
URL: https://github.com/apache/calcite/pull/1355#discussion_r310612842
##########
File path: core/src/main/java/org/apache/calcite/rel/rules/ProjectTableScanRule.java
##########
@@ -103,12 +103,12 @@ protected static boolean test(TableScan scan) {
protected void apply(RelOptRuleCall call, Project project, TableScan scan) {
final RelOptTable table = scan.getTable();
assert table.unwrap(ProjectableFilterableTable.class) != null;
-
- final Mappings.TargetMapping mapping = project.getMapping();
- if (mapping == null
- || Mappings.isIdentity(mapping)) {
+ if (!project.isMapping()) {
return;
}
+ final Mappings.TargetMapping mapping = Project.getPartialMapping(
+ project.getInput().getRowType().getFieldCount(),
+ project.getProjects());
Review comment:
Shall we consider update https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/interpreter/Bindables.java#L250 ?
If not, it might be only safe to pass an identity mapping to `BindableTableScan.create`. Because in my understanding, current `BindableTableScan` doesn't have functionality for filterable and projectable scan.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services