Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Sep 29, 2024
1 parent 1fdd098 commit 7ea4f4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ public long getRowCountForIndex(long indexId, boolean strict) {
long rowCount = 0;
for (Map.Entry<Long, Partition> entry : idToPartition.entrySet()) {
MaterializedIndex index = entry.getValue().getIndex(indexId);
if (strict && !index.getRowCountReported()) {
if (index == null || strict && !index.getRowCountReported()) {
return -1;
}
rowCount += (index == null || index.getRowCount() == -1) ? 0 : index.getRowCount();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void testExecute() throws Exception {
}
Statistics statistics = cascadesContext.getMemo().getRoot().getStatistics();
Assertions.assertNotNull(statistics);
Assertions.assertTrue(Precision.equals(1, statistics.getRowCount(), 0.1));
Assertions.assertTrue(Precision.equals(0, statistics.getRowCount(), 0.1));
}

private LogicalOlapScan constructOlapSCan() {
Expand Down

0 comments on commit 7ea4f4e

Please sign in to comment.