Skip to content

Commit

Permalink
ut
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Aug 26, 2024
1 parent 5570b57 commit 07f49bc
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1367,22 +1367,23 @@ public void testStringRangeColToCol() {
}

@Test
void testAndWithInfinite() {
void testAndWithInfinity() {
Double row = 1000.0;
SlotReference a = new SlotReference("a", new VarcharType(25));
ColumnStatisticBuilder columnStatisticBuilderA = new ColumnStatisticBuilder()
.setNdv(233)
.setAvgSizeByte(4)
.setNumNulls(0)
.setCount(133493073);
.setCount(row);

SlotReference b = new SlotReference("b", new VarcharType(25));
ColumnStatisticBuilder columnStatisticBuilderB = new ColumnStatisticBuilder()
.setNdv(488)
.setAvgSizeByte(25)
.setNumNulls(0)
.setCount(133493073);
.setCount(row);
StatisticsBuilder statsBuilder = new StatisticsBuilder();
statsBuilder.setRowCount(133493073);
statsBuilder.setRowCount(row);
statsBuilder.putColumnStatistics(a, columnStatisticBuilderA.build());
statsBuilder.putColumnStatistics(b, columnStatisticBuilderB.build());

Expand All @@ -1392,6 +1393,6 @@ void testAndWithInfinite() {
);

Statistics stats = new FilterEstimation().estimate(predicate, statsBuilder.build());
System.out.println(stats);
Assertions.assertEquals(stats.getRowCount(), 250);
}
}

0 comments on commit 07f49bc

Please sign in to comment.