Skip to content

Commit

Permalink
ISPN-14194 Restore the inefficiency for the aggregation
Browse files Browse the repository at this point in the history
That is the way aggregations currently work, the inefficiency could be removed delegating them to Search! (see ISPN-13986)
  • Loading branch information
fax4ever committed Oct 14, 2022
1 parent fdfa766 commit 0dffcdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ protected BaseQuery<?> buildQueryWithAggregations(QueryFactory queryFactory, Str

// first phase: gather rows matching the 'where' clause
String firstPhaseQueryStr = firstPhaseQuery.toString();
BaseQuery<?> baseQuery = buildQueryNoAggregations(queryFactory, firstPhaseQueryStr, namedParameters, -1, -1, parse(firstPhaseQueryStr), local);
// TODO ISPN-13986 Improve the efficiency of aggregation deletege them to Search!
BaseQuery<?> baseQuery = buildQueryNoAggregations(queryFactory, firstPhaseQueryStr, namedParameters, -1, Integer.MAX_VALUE, parse(firstPhaseQueryStr), local);

// second phase: grouping, aggregation, 'having' clause filtering, sorting and pagination
String secondPhaseQueryStr = secondPhaseQuery.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ protected BaseQuery<?> buildQueryWithAggregations(QueryFactory queryFactory, Str

// first phase: gather rows matching the 'where' clause
String firstPhaseQueryStr = firstPhaseQuery.toString();
BaseQuery<?> baseQuery = buildQueryNoAggregations(queryFactory, firstPhaseQueryStr, namedParameters, -1, -1, parse(firstPhaseQueryStr), local);
// TODO ISPN-13986 Improve the efficiency of aggregation deletege them to Search!
BaseQuery<?> baseQuery = buildQueryNoAggregations(queryFactory, firstPhaseQueryStr, namedParameters, -1, Integer.MAX_VALUE, parse(firstPhaseQueryStr), local);

// second phase: grouping, aggregation, 'having' clause filtering, sorting and pagination
String secondPhaseQueryStr = secondPhaseQuery.toString();
Expand Down

0 comments on commit 0dffcdb

Please sign in to comment.