Skip to content

Commit

Permalink
fix agg partial pushDown issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutao-liu committed Jun 13, 2022
1 parent 5d439ab commit adfd369
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 adfd369

Please sign in to comment.