julianhyde commented on PR #2800:
URL: https://github.com/apache/calcite/pull/2800#issuecomment-1127335877
I saw you used `Strong`, which is great. At some point we could improve this
- add a method say `ImmutableBitSet Strong.strongKeys(RexNode e)` that returns,
for a given expression `e`, the columns that must not be null in order for `e`
to be not null.
The rule currently does
```
final ImmutableBitSet.Builder notNullableKeys =
ImmutableBitSet.builder();
RelOptUtil.conjunctions(join.getCondition()).forEach(node -> {
if (Strong.isStrong(node)) {
notNullableKeys.addAll(RelOptUtil.InputFinder.bits(node));
}
});
```
but that `strongKeys` would not need to call `conjunctions` because it would
work on `AND` just like any other operator.
--
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]