ivandasch commented on code in PR #11410:
URL: https://github.com/apache/ignite/pull/11410#discussion_r1708824681
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/LogicalRelImplementor.java:
##########
@@ -172,6 +172,21 @@ public LogicalRelImplementor(
Node<Row> input = visit(rel.getInput());
+ if (distribution.function().affinity()) { // Affinity key can't be
null, so filter out null values.
+ assert distribution.getKeys().size() == 1 :
distribution.getKeys().size();
+
+ int affKey = distribution.getKeys().get(0);
+
+ if
(rel.getRowType().getFieldList().get(affKey).getType().isNullable()) {
Review Comment:
What if `get(affKey)` returns null?
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/LogicalRelImplementor.java:
##########
@@ -172,6 +172,21 @@ public LogicalRelImplementor(
Node<Row> input = visit(rel.getInput());
+ if (distribution.function().affinity()) { // Affinity key can't be
null, so filter out null values.
+ assert distribution.getKeys().size() == 1 :
distribution.getKeys().size();
Review Comment:
Let's write a meaningful assert message, shall we?
--
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]