Vladsz83 commented on code in PR #10390:
URL: https://github.com/apache/ignite/pull/10390#discussion_r1040684450


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/IndexScan.java:
##########
@@ -305,6 +311,34 @@ private synchronized void release() {
         return new IndexQueryContext(filter, null, mvccSnapshot);
     }
 
+    /**
+     * Creates row filter to skip null values in the first index column.
+     */
+    public static BPlusTree.TreeRowClosure<IndexRow, IndexRow> 
createNotNullRowFilter(InlineIndex idx) {
+        List<InlineIndexKeyType> inlineKeyTypes = 
idx.segment(0).rowHandler().inlineIndexKeyTypes();
+
+        InlineIndexKeyType keyType = F.isEmpty(inlineKeyTypes) ? null : 
inlineKeyTypes.get(0);
+
+        return new BPlusTree.TreeRowClosure<IndexRow, IndexRow>() {
+            /** {@inheritDoc} */
+            @Override public boolean apply(
+                BPlusTree<IndexRow, IndexRow> tree,
+                BPlusIO<IndexRow> io,
+                long pageAddr,
+                int idx
+            ) throws IgniteCheckedException {
+                if (keyType != null && io instanceof InlineIO) {
+                    Boolean keyIsNull = keyType.isNull(pageAddr, 
io.offset(idx), ((InlineIO)io).inlineSize());

Review Comment:
   We take first keyType velue from 'inlineKeyTypes'. Is it possible that one 
key value is null when some other is not?



-- 
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]

Reply via email to