private static void updatePartialIndex ( IndexScanPlanNode scan ) { if ( scan . getPredicate ( ) == null && scan . getPartialIndexPredicate ( ) != null ) { if ( scan . isForSortOrderOnly ( ) ) { scan . setPredicate ( Collections . singletonList ( scan . getPartialIndexPredicate ( ) ) ) ; } scan . setForPartialIndexOnly ( ) ; } }
Check if the index for the scan node is a partial index and if so make sure that the scan contains index predicate and update index reason as needed for