Skip to content

Commit

Permalink
fix grouping sets number validate (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchengchenghh authored and zhejiangxiaomai committed Jan 5, 2023
1 parent 68d0299 commit 277e0bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions velox/substrait/SubstraitToVeloxPlanValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

#include <glog/logging.h>
#include "velox/substrait/SubstraitToVeloxPlanValidator.h"
#include "TypeUtils.h"
#include "velox/expression/SignatureBinder.h"
Expand Down Expand Up @@ -181,6 +182,11 @@ bool SubstraitToVeloxPlanValidator::validate(
}
}
}
// GroupIdNode constructor check
if (sExpand.groupings_size() <= 2) {
LOG(INFO) << "GroupIdNode requires two or more grouping sets.";
return false;
}

return true;
}
Expand Down

0 comments on commit 277e0bf

Please sign in to comment.