korlov42 commented on a change in pull request #9282:
URL: https://github.com/apache/ignite/pull/9282#discussion_r681709647
##########
File path:
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rule/LogicalScanConverterRule.java
##########
@@ -71,7 +106,23 @@
RelMetadataQuery mq,
IgniteLogicalTableScan rel
) {
- RelTraitSet traits =
rel.getTraitSet().replace(IgniteConvention.INSTANCE);
+ RelOptCluster cluster = rel.getCluster();
+ IgniteTable table = rel.getTable().unwrap(IgniteTable.class);
+
+ RelDistribution distribution = table.distribution();
+ if (rel.requiredColumns() != null) {
+ Mappings.TargetMapping mapping = createMapping(
+ rel.projects(),
+ rel.requiredColumns(),
+
table.getRowType(cluster.getTypeFactory()).getFieldCount()
+ );
+
+ distribution = distribution.apply(mapping);
+ }
+
+ RelTraitSet traits =
cluster.traitSetOf(IgniteConvention.INSTANCE)
Review comment:
before this patch the traits partially were set for logical rels and
transitively were applied to the physical rels. Now the traits are created for
physical rels only
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]