reshke commented on code in PR #811:
URL: https://github.com/apache/cloudberry/pull/811#discussion_r1905346283
##########
src/backend/access/appendonly/appendonlyblockdirectory.c:
##########
@@ -692,48 +693,43 @@ AppendOnlyBlockDirectory_GetEntry(
systable_endscan_ordered(idxScanDesc);
}
+
- {
- MinipagePerColumnGroup *minipageInfo;
+ minipageInfo = &blockDirectory->minipages[columnGroupNo];
- minipageInfo = &blockDirectory->minipages[columnGroupNo];
+ /*
+ * Perform a binary search over the minipage to find the entry about
+ * the AO block.
+ */
+ entry_no = find_minipage_entry(minipageInfo->minipage,
+
minipageInfo->numMinipageEntries,
+ rowNum);
+ /* If there are no entries, return false. */
+ if (entry_no == -1 && minipageInfo->numMinipageEntries == 0)
+ return false;
+
+ if (entry_no == -1)
+ {
Review Comment:
its actually fine here for readability. I can find several places in
PostgreSQL with similar pattern
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]