@ Override public RowIterator findFirstRowNotNull ( Session session , PersistentStore store ) { readLock . lock ( ) ; try { NodeAVL x = getAccessor ( store ) ; while ( x != null ) { boolean t = colTypes [ 0 ] . compare ( null , x . getRow ( store ) . getData ( ) [ colIndex [ 0 ] ] ) >= 0 ; if ( t ) { NodeAVL r = x . getRight ( store ) ; if ( r == null ) { break ; } x = r ; } else { NodeAVL l = x . getLeft ( store ) ; if ( l == null ) { break ; } x = l ; } } while ( x != null ) { Object colvalue = x . getRow ( store ) . getData ( ) [ colIndex [ 0 ] ] ; if ( colvalue == null ) { x = next ( store , x ) ; } else { break ; } } // MVCC while ( session != null && x != null ) { Row row = x . getRow ( store ) ; if ( session . database . txManager . canRead ( session , row ) ) { break ; } x = next ( store , x ) ; } return getIterator ( session , store , x ) ; } finally { readLock . unlock ( ) ; } }
Finds the first node where the data is not null .