Skip to content

Commit

Permalink
Fix a bug in window validation (facebookincubator#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE authored and zhejiangxiaomai committed Feb 27, 2023
1 parent b144073 commit 3d4b205
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions velox/substrait/SubstraitToVeloxPlanValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,11 @@ bool SubstraitToVeloxPlanValidator::validate(
windowFunction.window_type());
}

validateBoundType(windowFunction.upper_bound());
validateBoundType(windowFunction.lower_bound());

bool boundTypeSupported = validateBoundType(windowFunction.upper_bound()) &&
validateBoundType(windowFunction.lower_bound());
if (!boundTypeSupported) {
return false;
}
} catch (const VeloxException& err) {
std::cout << "Validation failed for window function due to: "
<< err.message() << std::endl;
Expand Down

0 comments on commit 3d4b205

Please sign in to comment.