From 07f49bc7850411142287f0d38ea1cfa3d07c5036 Mon Sep 17 00:00:00 2001 From: minghong Date: Mon, 26 Aug 2024 19:55:47 +0800 Subject: [PATCH] ut --- .../doris/nereids/stats/FilterEstimationTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java index 79ecb4235b5ce0..75a9e0a91a8745 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java @@ -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()); @@ -1392,6 +1393,6 @@ void testAndWithInfinite() { ); Statistics stats = new FilterEstimation().estimate(predicate, statsBuilder.build()); - System.out.println(stats); + Assertions.assertEquals(stats.getRowCount(), 250); } }