File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
presto-native-execution/presto_cpp/main/types Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -855,20 +855,19 @@ VeloxQueryPlanConverterBase::toColumnStatsSpec(
855855 sourceVeloxPlan);
856856
857857 // Sanity checks on aggregation node.
858- if (aggregationNode->ignoreNullKeys () ||
859- aggregationNode->groupId ().has_value () ||
860- aggregationNode->isPreGrouped () ||
861- !aggregationNode->globalGroupingSets ().empty () ||
862- aggregationNode->aggregateNames ().empty () ||
863- (aggregationNode->aggregateNames ().size () !=
864- aggregationNode->aggregates ().size ())) {
865- return std::nullopt ;
866- }
867- return std::make_optional (core::ColumnStatsSpec{
858+ VELOX_CHECK (!aggregationNode->ignoreNullKeys ());
859+ VELOX_CHECK (!aggregationNode->groupId ().has_value ());
860+ VELOX_CHECK (!aggregationNode->isPreGrouped ());
861+ VELOX_CHECK (aggregationNode->globalGroupingSets ().empty ());
862+ VELOX_CHECK (!aggregationNode->aggregateNames ().empty ());
863+ VELOX_CHECK_EQ (
864+ aggregationNode->aggregateNames ().size (),
865+ aggregationNode->aggregates ().size ());
866+ return core::ColumnStatsSpec{
868867 aggregationNode->groupingKeys (),
869868 aggregationNode->step (),
870869 aggregationNode->aggregateNames (),
871- aggregationNode->aggregates ()}) ;
870+ aggregationNode->aggregates ()};
872871}
873872
874873std::vector<protocol::VariableReferenceExpression>
You can’t perform that action at this time.
0 commit comments