Skip to content

Commit

Permalink
Merge pull request #49 from Jutao-liu/main
Browse files Browse the repository at this point in the history
fix agg partial pushDown issue
  • Loading branch information
tedliUCAS authored Jun 13, 2022
2 parents 88a39b9 + adfd369 commit 2a19c3d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ public Object dispatch(Node nd, Stack<Node> stack, Object... nodeOutputs) throws
// get OmniData filter expression
if (isPushDownFilter) {
filter = getOmniDataFilter(omniDataPredicate);
if (!filter.isPresent()) {
isPushDownFilter = false;
isPushDownAgg = false;
}
}
// get OmniData agg expression
if (isPushDownAgg) {
Expand Down Expand Up @@ -304,15 +308,13 @@ private Optional<RowExpression> getOmniDataFilter(OmniDataPredicate omniDataPred
// The AGG does not support part push down
isPushDownAgg = false;
} else if (mode.equals(NdpFilter.NdpFilterMode.NONE)) {
isPushDownFilter = false;
return Optional.empty();
}
OmniDataFilter omniDataFilter = new OmniDataFilter(omniDataPredicate);
// ExprNodeGenericFuncDesc need to clone
RowExpression filterRowExpression = omniDataFilter.getFilterExpression(
(ExprNodeGenericFuncDesc) filterDesc.clone(), ndpFilter);
if (filterRowExpression == null) {
isPushDownFilter = false;
return Optional.empty();
}
return Optional.of(filterRowExpression);
Expand Down

0 comments on commit 2a19c3d

Please sign in to comment.