[ https://issues.apache.org/jira/browse/CALCITE-5377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ruben Q L resolved CALCITE-5377. -------------------------------- Fix Version/s: 1.33.0 Resolution: Fixed Fixed in https://github.com/apache/calcite/commit/ad77a20f286d4b25b26e940e92b40a15acb2e333 Thanks [~yoncise] for creating the ticket and [~jiajunbernoulli] for the patch! > RelFieldTrimmer support Sort with dynamic param > ----------------------------------------------- > > Key: CALCITE-5377 > URL: https://issues.apache.org/jira/browse/CALCITE-5377 > Project: Calcite > Issue Type: Improvement > Components: core > Affects Versions: 1.32.0 > Reporter: YUAN > Assignee: Jiajun Xie > Priority: Major > Labels: pull-request-available > Fix For: 1.33.0 > > Time Spent: 10m > Remaining Estimate: 0h > > If Sort rel node used dynamic param, RelFieldTrimmer can not trim fields as > expected. > The behavior makes ProjectableFilterableTable can not get correct projects. > Related code: > {code:java} > // > org.apache.calcite.sql2rel.RelFieldTrimmer#trimFields(org.apache.calcite.rel.core.Sort, > org.apache.calcite.util.ImmutableBitSet, > java.util.Set<org.apache.calcite.rel.type.RelDataTypeField>) > // leave the Sort unchanged in case we have dynamic limits > if (sort.offset instanceof RexDynamicParam > || sort.fetch instanceof RexDynamicParam) { > return result(sort, inputMapping); > } {code} > I think we can support dynamic param without breaking anything. -- This message was sent by Atlassian Jira (v8.20.10#820010)