From e2c0014b219f30cc007a665b5722ae8d218e391a Mon Sep 17 00:00:00 2001 From: yanngyoung Date: Wed, 15 May 2024 22:12:28 -0700 Subject: [PATCH] Remove allowInputShuffle_ flag in AggregationTestBase::testReadFromFiles (#9482) Summary: Simplify the AggregationTestBase by automatically determining if the aggregate function is order-sensitive, which would disallow input shuffling. If the orderSensitive flag is set to true for any of the test aggregates, disable the test from files. Fixes https://github.com/facebookincubator/velox/issues/9274 Pull Request resolved: https://github.com/facebookincubator/velox/pull/9482 Reviewed By: Yuhta Differential Revision: D57340678 Pulled By: kgpai fbshipit-source-id: 2e54fb7a2362a95cc5ca1dc01032722af23fd745 --- velox/docs/develop/aggregate-functions.rst | 3 +- .../exec/tests/SimpleAggregateAdapterTest.cpp | 2 - .../lib/aggregates/tests/SumTestBase.h | 1 - .../tests/utils/AggregationTestBase.cpp | 68 ++++++++++++++++--- .../tests/utils/AggregationTestBase.h | 13 ---- .../tests/ApproxMostFrequentTest.cpp | 1 - .../aggregates/tests/ApproxPercentileTest.cpp | 1 - .../tests/AverageAggregationTest.cpp | 1 - .../tests/BitwiseAggregationTest.cpp | 1 - .../aggregates/tests/BoolAndOrTest.cpp | 1 - .../tests/CentralMomentsAggregationTest.cpp | 1 - .../tests/ChecksumAggregateTest.cpp | 1 - .../aggregates/tests/CountAggregationTest.cpp | 1 - .../aggregates/tests/CountDistinctTest.cpp | 1 - .../tests/CountIfAggregationTest.cpp | 1 - .../tests/CovarianceAggregationTest.cpp | 1 - .../tests/EntropyAggregationTest.cpp | 1 - .../aggregates/tests/GeometricMeanTest.cpp | 1 - .../aggregates/tests/HistogramTest.cpp | 1 - .../prestosql/aggregates/tests/MapAggTest.cpp | 2 - .../aggregates/tests/MaxSizeForStatsTest.cpp | 1 - .../tests/MinMaxByAggregationTest.cpp | 6 -- .../prestosql/aggregates/tests/MinMaxTest.cpp | 2 - .../aggregates/tests/MultiMapAggTest.cpp | 1 - .../aggregates/tests/ReduceAggTest.cpp | 1 - .../prestosql/aggregates/tests/SetAggTest.cpp | 1 - .../aggregates/tests/SetUnionTest.cpp | 1 - .../tests/SumDataSizeForStatsTest.cpp | 1 - .../tests/VarianceAggregationTest.cpp | 4 +- .../tests/AverageAggregationTest.cpp | 1 - .../tests/BitwiseXorAggregationTest.cpp | 1 - .../tests/BloomFilterAggAggregateTest.cpp | 1 - .../tests/MinMaxByAggregationTest.cpp | 1 - 33 files changed, 62 insertions(+), 63 deletions(-) diff --git a/velox/docs/develop/aggregate-functions.rst b/velox/docs/develop/aggregate-functions.rst index 36955a2b0799..8c60890dfcf4 100644 --- a/velox/docs/develop/aggregate-functions.rst +++ b/velox/docs/develop/aggregate-functions.rst @@ -976,8 +976,7 @@ The following query plans are being tested. final aggregation with forced spilling. Query runs using 4 threads. Query run with forced spilling is enabled only for group-by aggregations and -only if `allowInputShuffle_` flag is enabled by calling allowInputShuffle -() method from the SetUp(). Spill testing requires multiple batches of input. +only if aggregate functions are not order-sensitive. Spill testing requires multiple batches of input. To split input data into multiple batches we add local exchange with round-robin repartitioning before the partial aggregation. This changes the order in which aggregation inputs are processed, hence, query results with spilling diff --git a/velox/exec/tests/SimpleAggregateAdapterTest.cpp b/velox/exec/tests/SimpleAggregateAdapterTest.cpp index 284814801739..0a71f843a3f1 100644 --- a/velox/exec/tests/SimpleAggregateAdapterTest.cpp +++ b/velox/exec/tests/SimpleAggregateAdapterTest.cpp @@ -34,7 +34,6 @@ class SimpleAverageAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); registerSimpleAverageAggregate(kSimpleAvg); } @@ -114,7 +113,6 @@ class SimpleArrayAggAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - disallowInputShuffle(); registerSimpleArrayAggAggregate(kSimpleArrayAgg); } diff --git a/velox/functions/lib/aggregates/tests/SumTestBase.h b/velox/functions/lib/aggregates/tests/SumTestBase.h index 61f467c146ec..6d4f72cf9e81 100644 --- a/velox/functions/lib/aggregates/tests/SumTestBase.h +++ b/velox/functions/lib/aggregates/tests/SumTestBase.h @@ -67,7 +67,6 @@ class SumTestBase : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } template < diff --git a/velox/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp b/velox/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp index e973a09d9c19..e3b33dd6df8f 100644 --- a/velox/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp +++ b/velox/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp @@ -272,6 +272,55 @@ getFunctionNamesAndArgs(const std::vector& aggregates) { } return std::make_pair(functionNames, aggregateArgs); } + +// Given a list of aggregation expressions, e.g., {"avg(c0)", +// "\"$internal$count_distinct\"(c1)"}, fetch the function names from +// AggregationNode of builder.planNode(). +std::vector getFunctionNames( + std::function makeSource, + const std::vector& aggregates, + memory::MemoryPool* pool) { + std::vector functionNames; + + PlanBuilder builder(pool); + makeSource(builder); + + builder.singleAggregation({}, aggregates); + auto& aggregationNode = + static_cast(*builder.planNode()); + + for (const auto& aggregate : aggregationNode.aggregates()) { + const auto& aggregateExpr = aggregate.call; + const auto& name = aggregateExpr->name(); + + functionNames.push_back(name); + } + + return functionNames; +} + +// Given a list of aggregation expressions, check if any of aggregate functions +// are order sensitive with metadata. +bool hasOrderSensitive( + std::function makeSource, + const std::vector& aggregates, + memory::MemoryPool* pool) { + auto functionNames = getFunctionNames(makeSource, aggregates, pool); + return std::any_of( + functionNames.begin(), functionNames.end(), [](const auto& functionName) { + auto* entry = exec::getAggregateFunctionEntry(functionName); + const auto& metadata = entry->metadata; + return metadata.orderSensitive; + }); +} +// Same as above, but allows to specify input data instead of a function. +bool hasOrderSensitive( + const std::vector& data, + const std::vector& aggregates, + memory::MemoryPool* pool) { + return hasOrderSensitive( + [&](PlanBuilder& builder) { builder.values(data); }, aggregates, pool); +} } // namespace void AggregationTestBase::testAggregationsWithCompanion( @@ -372,7 +421,7 @@ void AggregationTestBase::testAggregationsWithCompanion( assertResults(queryBuilder); } - if (!groupingKeys.empty() && allowInputShuffle_) { + if (!groupingKeys.empty() && !hasOrderSensitive(data, aggregates, pool())) { SCOPED_TRACE("Run partial + final with spilling"); PlanBuilder builder(pool()); builder.values(dataWithExtraGroupingKey); @@ -604,7 +653,6 @@ bool isTableScanSupported(const TypePtr& type) { return true; } - } // namespace void AggregationTestBase::testReadFromFiles( @@ -633,9 +681,10 @@ void AggregationTestBase::testReadFromFiles( auto writerPool = rootPool_->addAggregateChild("AggregationTestBase.writer"); // Splits and writes the input vectors into two files, to some extent, - // involves shuffling of the inputs. So only split input if allowInputShuffle_ - // is true. Otherwise, only write into a single file. - if (allowInputShuffle_ && input->size() >= 2) { + // involves shuffling of the inputs. So only split input if aggregate + // is non-orderSensitive. Otherwise, only write into a single file. + if (!hasOrderSensitive(makeSource, aggregates, pool()) && + input->size() >= 2) { auto size1 = input->size() / 2; auto size2 = input->size() - size1; auto input1 = input->slice(0, size1); @@ -814,7 +863,8 @@ void AggregationTestBase::testAggregationsImpl( assertResults(queryBuilder); } - if (!groupingKeys.empty() && allowInputShuffle_) { + if (!groupingKeys.empty() && + !hasOrderSensitive(makeSource, aggregates, pool())) { SCOPED_TRACE("Run partial + final with spilling"); PlanBuilder builder(pool()); makeSource(builder); @@ -926,7 +976,8 @@ void AggregationTestBase::testAggregationsImpl( assertResults(queryBuilder); } - if (!groupingKeys.empty() && allowInputShuffle_) { + if (!groupingKeys.empty() && + !hasOrderSensitive(makeSource, aggregates, pool())) { SCOPED_TRACE("Run single with spilling"); PlanBuilder builder(pool()); makeSource(builder); @@ -1117,7 +1168,8 @@ void AggregationTestBase::testAggregations( testIncrementalAggregation(makeSource, aggregates, config); } - if (allowInputShuffle_ && !groupingKeys.empty()) { + if (!hasOrderSensitive(makeSource, aggregates, pool()) && + !groupingKeys.empty()) { testStreamingAggregationsImpl( makeSource, groupingKeys, diff --git a/velox/functions/lib/aggregates/tests/utils/AggregationTestBase.h b/velox/functions/lib/aggregates/tests/utils/AggregationTestBase.h index 0b0968f5d009..595183bcc77a 100644 --- a/velox/functions/lib/aggregates/tests/utils/AggregationTestBase.h +++ b/velox/functions/lib/aggregates/tests/utils/AggregationTestBase.h @@ -220,17 +220,6 @@ class AggregationTestBase : public exec::test::OperatorTestBase { const std::string& expectedMessage, const std::unordered_map& config = {}); - /// Specifies that aggregate functions used in this test are not sensitive - /// to the order of inputs. - void allowInputShuffle() { - allowInputShuffle_ = true; - } - /// Specifies that aggregate functions used in this test are sensitive - /// to the order of inputs. - void disallowInputShuffle() { - allowInputShuffle_ = false; - } - void disableTestStreaming() { testStreaming_ = false; } @@ -296,8 +285,6 @@ class AggregationTestBase : public exec::test::OperatorTestBase { std::function( exec::test::AssertQueryBuilder&)> assertResults, const std::unordered_map& config); - - bool allowInputShuffle_{false}; }; } // namespace facebook::velox::functions::aggregate::test diff --git a/velox/functions/prestosql/aggregates/tests/ApproxMostFrequentTest.cpp b/velox/functions/prestosql/aggregates/tests/ApproxMostFrequentTest.cpp index 1c018486c5c5..2b51f08e7e8b 100644 --- a/velox/functions/prestosql/aggregates/tests/ApproxMostFrequentTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/ApproxMostFrequentTest.cpp @@ -27,7 +27,6 @@ struct ApproxMostFrequentTest : AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } std::shared_ptr> makeGroupKeys() { diff --git a/velox/functions/prestosql/aggregates/tests/ApproxPercentileTest.cpp b/velox/functions/prestosql/aggregates/tests/ApproxPercentileTest.cpp index 6e131c1c6190..4f25c8d18e24 100644 --- a/velox/functions/prestosql/aggregates/tests/ApproxPercentileTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/ApproxPercentileTest.cpp @@ -87,7 +87,6 @@ class ApproxPercentileTest : public AggregationTestBase { void SetUp() override { AggregationTestBase::SetUp(); random::setSeed(0); - allowInputShuffle(); } template diff --git a/velox/functions/prestosql/aggregates/tests/AverageAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/AverageAggregationTest.cpp index 969ad055ec10..ffb208c19aa9 100644 --- a/velox/functions/prestosql/aggregates/tests/AverageAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/AverageAggregationTest.cpp @@ -33,7 +33,6 @@ class AverageAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); registerSimpleAverageAggregate("simple_avg"); } diff --git a/velox/functions/prestosql/aggregates/tests/BitwiseAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/BitwiseAggregationTest.cpp index c1daa1ae72e3..eb7e61837c56 100644 --- a/velox/functions/prestosql/aggregates/tests/BitwiseAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/BitwiseAggregationTest.cpp @@ -27,7 +27,6 @@ class BitwiseAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } RowTypePtr rowType_{ diff --git a/velox/functions/prestosql/aggregates/tests/BoolAndOrTest.cpp b/velox/functions/prestosql/aggregates/tests/BoolAndOrTest.cpp index a4ec9c1fbee8..ef2236d75b0c 100644 --- a/velox/functions/prestosql/aggregates/tests/BoolAndOrTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/BoolAndOrTest.cpp @@ -38,7 +38,6 @@ class BoolAndOrTest : public virtual AggregationTestBase, protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/CentralMomentsAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/CentralMomentsAggregationTest.cpp index bbe2148a2624..e37539b58ab4 100644 --- a/velox/functions/prestosql/aggregates/tests/CentralMomentsAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/CentralMomentsAggregationTest.cpp @@ -29,7 +29,6 @@ class CentralMomentsAggregationTest protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } void testGroupBy( diff --git a/velox/functions/prestosql/aggregates/tests/ChecksumAggregateTest.cpp b/velox/functions/prestosql/aggregates/tests/ChecksumAggregateTest.cpp index 31b0d56b45fe..89af8a8e8b90 100644 --- a/velox/functions/prestosql/aggregates/tests/ChecksumAggregateTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/ChecksumAggregateTest.cpp @@ -31,7 +31,6 @@ class ChecksumAggregateTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } template diff --git a/velox/functions/prestosql/aggregates/tests/CountAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/CountAggregationTest.cpp index 952b0fce40e6..6f71135f7d10 100644 --- a/velox/functions/prestosql/aggregates/tests/CountAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/CountAggregationTest.cpp @@ -29,7 +29,6 @@ class CountAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } RowTypePtr rowType_{ diff --git a/velox/functions/prestosql/aggregates/tests/CountDistinctTest.cpp b/velox/functions/prestosql/aggregates/tests/CountDistinctTest.cpp index 8a2ae3287d1d..ee8644e792ab 100644 --- a/velox/functions/prestosql/aggregates/tests/CountDistinctTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/CountDistinctTest.cpp @@ -31,7 +31,6 @@ class CountDistinctTest : public AggregationTestBase { void SetUp() override { prestosql::registerInternalAggregateFunctions(""); AggregationTestBase::SetUp(); - allowInputShuffle(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/CountIfAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/CountIfAggregationTest.cpp index 15d78801332b..261422c7ca16 100644 --- a/velox/functions/prestosql/aggregates/tests/CountIfAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/CountIfAggregationTest.cpp @@ -26,7 +26,6 @@ class CountIfAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } RowTypePtr rowType_{ diff --git a/velox/functions/prestosql/aggregates/tests/CovarianceAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/CovarianceAggregationTest.cpp index 4e4a172e339d..bc851ff45ecc 100644 --- a/velox/functions/prestosql/aggregates/tests/CovarianceAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/CovarianceAggregationTest.cpp @@ -28,7 +28,6 @@ class CovarianceAggregationTest protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } void testGroupBy(const std::string& aggName, const RowVectorPtr& data) { diff --git a/velox/functions/prestosql/aggregates/tests/EntropyAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/EntropyAggregationTest.cpp index 91ff0cf7fd87..bf37188be5e0 100644 --- a/velox/functions/prestosql/aggregates/tests/EntropyAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/EntropyAggregationTest.cpp @@ -29,7 +29,6 @@ class EntropyAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } void testGroupByAgg( diff --git a/velox/functions/prestosql/aggregates/tests/GeometricMeanTest.cpp b/velox/functions/prestosql/aggregates/tests/GeometricMeanTest.cpp index 749906346d6c..9a6a46dcd119 100644 --- a/velox/functions/prestosql/aggregates/tests/GeometricMeanTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/GeometricMeanTest.cpp @@ -30,7 +30,6 @@ class GeometricMeanTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/HistogramTest.cpp b/velox/functions/prestosql/aggregates/tests/HistogramTest.cpp index f06f7d82a085..c444b0a947a5 100644 --- a/velox/functions/prestosql/aggregates/tests/HistogramTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/HistogramTest.cpp @@ -31,7 +31,6 @@ class HistogramTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } void testHistogramWithDuck( diff --git a/velox/functions/prestosql/aggregates/tests/MapAggTest.cpp b/velox/functions/prestosql/aggregates/tests/MapAggTest.cpp index 066f47faae0a..c837599399e6 100644 --- a/velox/functions/prestosql/aggregates/tests/MapAggTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/MapAggTest.cpp @@ -125,8 +125,6 @@ TEST_F(MapAggTest, groupByWithNullValues) { } TEST_F(MapAggTest, groupByWithDuplicates) { - disallowInputShuffle(); - auto data = makeRowVector({ makeFlatVector({0, 0, 1, 1, 2, 2, 3, 3, 4, 4}), makeFlatVector({0, 0, 1, 1, 2, 2, 3, 3, 4, 4}), diff --git a/velox/functions/prestosql/aggregates/tests/MaxSizeForStatsTest.cpp b/velox/functions/prestosql/aggregates/tests/MaxSizeForStatsTest.cpp index 5a79f23a01ef..7990d774eea1 100644 --- a/velox/functions/prestosql/aggregates/tests/MaxSizeForStatsTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/MaxSizeForStatsTest.cpp @@ -27,7 +27,6 @@ class MaxSizeForStatsTest : public AggregationTestBase { public: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/MinMaxByAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/MinMaxByAggregationTest.cpp index b628c8914993..fd64123c7a5d 100644 --- a/velox/functions/prestosql/aggregates/tests/MinMaxByAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/MinMaxByAggregationTest.cpp @@ -325,7 +325,6 @@ std::string asSql(bool value) { void MinMaxByAggregationTestBase::SetUp() { AggregationTestBase::SetUp(); - AggregationTestBase::disallowInputShuffle(); std::vector supportedTypes; std::vector columnNames; int columnId = 0; @@ -647,8 +646,6 @@ TEST_P( } // Enable disk spilling test with distinct comparison values. - AggregationTestBase::allowInputShuffle(); - auto rowType = ROW({"c0", "c1"}, {createScalarType(GetParam().valueType), @@ -1083,8 +1080,6 @@ TEST_P( } // Enable disk spilling test with distinct comparison values. - AggregationTestBase::allowInputShuffle(); - auto rowType = ROW({"c0", "c1", "c2"}, {createScalarType(GetParam().valueType), @@ -1387,7 +1382,6 @@ class MinMaxByNTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - AggregationTestBase::allowInputShuffle(); AggregationTestBase::enableTestStreaming(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/MinMaxTest.cpp b/velox/functions/prestosql/aggregates/tests/MinMaxTest.cpp index 529217511cea..7e1f352484a0 100644 --- a/velox/functions/prestosql/aggregates/tests/MinMaxTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/MinMaxTest.cpp @@ -34,7 +34,6 @@ class MinMaxTest : public functions::aggregate::test::AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } std::vector fuzzData(const RowTypePtr& rowType) { @@ -474,7 +473,6 @@ class MinMaxNTest : public functions::aggregate::test::AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } template diff --git a/velox/functions/prestosql/aggregates/tests/MultiMapAggTest.cpp b/velox/functions/prestosql/aggregates/tests/MultiMapAggTest.cpp index 38cc67afcedf..45e4f63aa790 100644 --- a/velox/functions/prestosql/aggregates/tests/MultiMapAggTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/MultiMapAggTest.cpp @@ -23,7 +23,6 @@ class MultiMapAggTest : public functions::aggregate::test::AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/ReduceAggTest.cpp b/velox/functions/prestosql/aggregates/tests/ReduceAggTest.cpp index f938d4332948..f34d99980c51 100644 --- a/velox/functions/prestosql/aggregates/tests/ReduceAggTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/ReduceAggTest.cpp @@ -28,7 +28,6 @@ class ReduceAggTest : public functions::aggregate::test::AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); disableTestStreaming(); } diff --git a/velox/functions/prestosql/aggregates/tests/SetAggTest.cpp b/velox/functions/prestosql/aggregates/tests/SetAggTest.cpp index cc0641a7ae31..dadc62cde132 100644 --- a/velox/functions/prestosql/aggregates/tests/SetAggTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/SetAggTest.cpp @@ -35,7 +35,6 @@ class SetAggTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/SetUnionTest.cpp b/velox/functions/prestosql/aggregates/tests/SetUnionTest.cpp index aaee02ab6228..1297be90f8db 100644 --- a/velox/functions/prestosql/aggregates/tests/SetUnionTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/SetUnionTest.cpp @@ -33,7 +33,6 @@ class SetUnionTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/SumDataSizeForStatsTest.cpp b/velox/functions/prestosql/aggregates/tests/SumDataSizeForStatsTest.cpp index 3c3b05893632..ddd08f4525fc 100644 --- a/velox/functions/prestosql/aggregates/tests/SumDataSizeForStatsTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/SumDataSizeForStatsTest.cpp @@ -27,7 +27,6 @@ class SumDataSizeForStatsTest : public AggregationTestBase { public: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } }; diff --git a/velox/functions/prestosql/aggregates/tests/VarianceAggregationTest.cpp b/velox/functions/prestosql/aggregates/tests/VarianceAggregationTest.cpp index 254a28deb2ca..c298c418636d 100644 --- a/velox/functions/prestosql/aggregates/tests/VarianceAggregationTest.cpp +++ b/velox/functions/prestosql/aggregates/tests/VarianceAggregationTest.cpp @@ -41,7 +41,6 @@ class VarianceAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); } RowTypePtr rowType_{ @@ -159,8 +158,7 @@ TEST_F(VarianceAggregationTest, varianceNulls) { // when inputs are very large integers (> 15 digits long). Unfortunately // makeVectors() generates data that contains a lot of very large integers. // Replace makeVectors() with a dataset that doesn't contain very large -// integers and enable more testing by calling allowInputShuffle() from -// Setup(). +// integers and enable more testing. TEST_F(VarianceAggregationTest, varianceWithGlobalAggregation) { auto vectors = makeVectors(rowType_, 10, 20); createDuckDbTable(vectors); diff --git a/velox/functions/sparksql/aggregates/tests/AverageAggregationTest.cpp b/velox/functions/sparksql/aggregates/tests/AverageAggregationTest.cpp index 3dfbb97e5bd1..93057ef155a5 100644 --- a/velox/functions/sparksql/aggregates/tests/AverageAggregationTest.cpp +++ b/velox/functions/sparksql/aggregates/tests/AverageAggregationTest.cpp @@ -30,7 +30,6 @@ class AverageAggregationTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - allowInputShuffle(); registerAggregateFunctions("spark_"); } }; diff --git a/velox/functions/sparksql/aggregates/tests/BitwiseXorAggregationTest.cpp b/velox/functions/sparksql/aggregates/tests/BitwiseXorAggregationTest.cpp index 2e6892142a70..ea422392a4c0 100644 --- a/velox/functions/sparksql/aggregates/tests/BitwiseXorAggregationTest.cpp +++ b/velox/functions/sparksql/aggregates/tests/BitwiseXorAggregationTest.cpp @@ -25,7 +25,6 @@ class BitwiseXorAggregationTest : public aggregate::test::AggregationTestBase { void SetUp() override { AggregationTestBase::SetUp(); registerAggregateFunctions(""); - allowInputShuffle(); } RowTypePtr rowType_{ diff --git a/velox/functions/sparksql/aggregates/tests/BloomFilterAggAggregateTest.cpp b/velox/functions/sparksql/aggregates/tests/BloomFilterAggAggregateTest.cpp index 36ec41818e93..d36fe420a913 100644 --- a/velox/functions/sparksql/aggregates/tests/BloomFilterAggAggregateTest.cpp +++ b/velox/functions/sparksql/aggregates/tests/BloomFilterAggAggregateTest.cpp @@ -29,7 +29,6 @@ class BloomFilterAggAggregateTest void SetUp() override { AggregationTestBase::SetUp(); registerAggregateFunctions(""); - allowInputShuffle(); } VectorPtr getSerializedBloomFilter(int32_t capacity) { diff --git a/velox/functions/sparksql/aggregates/tests/MinMaxByAggregationTest.cpp b/velox/functions/sparksql/aggregates/tests/MinMaxByAggregationTest.cpp index e15b14b51547..2a946e82e287 100644 --- a/velox/functions/sparksql/aggregates/tests/MinMaxByAggregationTest.cpp +++ b/velox/functions/sparksql/aggregates/tests/MinMaxByAggregationTest.cpp @@ -28,7 +28,6 @@ class MinMaxByAggregateTest : public AggregationTestBase { protected: void SetUp() override { AggregationTestBase::SetUp(); - AggregationTestBase::disallowInputShuffle(); registerAggregateFunctions("spark_"); } };