korlov42 commented on code in PR #2671:
URL: https://github.com/apache/ignite-3/pull/2671#discussion_r1356751169
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/RangeCondition.java:
##########
@@ -29,9 +31,15 @@ public interface RangeCondition<RowT> {
/** Upper search row. */
RowT upper();
- /** Inlusive search by lower row. */
+ /** Return positions of unspecified (i.e. null equal) nodes depends to
lower bound. */
+ ImmutableBitSet unspecifiedLower();
Review Comment:
ticket description states `After reworking expandBounds the searchRow that
comes to RowConverter#toBinaryTuplePrefix should already contain a prefix
only.`. With such an approach, we still have nulls at the end of a searchRow.
I would suggest to rework this patch, so both `lower` and 'upper' will
return only real prefixes of index keys. Here is an example: if table row is
(a, b, c), we have index (c, a) and predicate `WHERE c > 0`, then `lower`
should be `Row [0]` (currently it is `Row [0, null]`)
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/ExpressionFactoryImpl.java:
##########
@@ -487,18 +473,11 @@ private Scalar compile(List<RexNode> nodes, RelDataType
type, boolean biInParams
RexProgramBuilder programBuilder = new RexProgramBuilder(type,
rexBuilder);
- BitSet unspecifiedValues = new BitSet(nodes.size());
-
for (int i = 0; i < nodes.size(); i++) {
RexNode node = nodes.get(i);
if (node != null) {
Review Comment:
we should not just ignore null nodes. Let's add an assertion for this.
--
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]