MCPcopy Create free account
hub / github.com/bytedance/bolt / TEST_F

Function TEST_F

bolt/exec/tests/AggregationTest.cpp:660–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658
659TEST_P(AggregationTest, global) {
660 auto vectors = makeVectors(rowType_, 10, 100);
661 createDuckDbTable(vectors);
662
663 auto op = PlanBuilder()
664 .values(vectors)
665 .aggregation(
666 {},
667 {"sum(15)",
668 "sum(c1)",
669 "sum(c2)",
670 "sum(c4)",
671 "sum(c5)",
672 "min(15)",
673 "min(c1)",
674 "min(c2)",
675 "min(c3)",
676 "min(c4)",
677 "min(c5)",
678 "max(15)",
679 "max(c1)",
680 "max(c2)",
681 "max(c3)",
682 "max(c4)",
683 "max(c5)",
684 "sumnonpod(1)"},
685 {},
686 core::AggregationNode::Step::kPartial,
687 false,
688 GetParam().useGPU)
689 .planNode();
690
691 assertQuery(
692 op,
693 "SELECT sum(15), sum(c1), sum(c2), sum(c4), sum(c5), "
694 "min(15), min(c1), min(c2), min(c3), min(c4), min(c5), "
695 "max(15), max(c1), max(c2), max(c3), max(c4), max(c5), sum(1) FROM tmp");
696
697 EXPECT_EQ(NonPODInt64::constructed, NonPODInt64::destructed);
698}
699
700TEST_P(AggregationTest, globalAggFunctionTimeNs) {
701 if (GetParam().useGPU) {
702 GTEST_SKIP() << "GPU Aggregation does not support statistics yet\n";
703 }
704
705 // Use a large enough workload to make the timer reliably non-zero.
706 auto vectors = makeVectors(rowType_, 20, 1000);
707 createDuckDbTable(vectors);
708
709 core::PlanNodeId aggNodeId;
710 auto plan =
711 PlanBuilder()
712 .values(vectors)
713 .singleAggregation(
714 {},
715 {"sum(c1)", "count(distinct c0)", "array_agg(c0 order by c0)"},
716 {},

Callers

nothing calls this directly

Calls 15

PlanBuilderClass · 0.85
assertQueryFunction · 0.85
toPlanStatsFunction · 0.85
checkSpillStatsFunction · 0.85
checkRowBasedSpillStatsFunction · 0.85
configMethod · 0.80
taskStatsMethod · 0.80
createFunction · 0.50
AssertQueryBuilderClass · 0.50
sizeMethod · 0.45
push_backMethod · 0.45
nameOfMethod · 0.45

Tested by

no test coverage detected