Skip to content

Commit

Permalink
Fix sonar issue in GroupByMemoryMergedResult
Browse files Browse the repository at this point in the history
  • Loading branch information
strongduanmu committed Oct 31, 2024
1 parent 649c338 commit e3c49db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ private boolean getValueCaseSensitiveFromTables(final QueryResult queryResult,
private List<MemoryQueryResultRow> getMemoryResultSetRows(final SelectStatementContext selectStatementContext,
final Map<GroupByValue, MemoryQueryResultRow> dataMap, final List<Boolean> valueCaseSensitive) {
if (dataMap.isEmpty()) {
Object[] data = generateReturnData(selectStatementContext);
boolean hasGroupBy = !selectStatementContext.getGroupByContext().getItems().isEmpty();
boolean hasAggregations = !selectStatementContext.getProjectionsContext().getAggregationProjections().isEmpty();
if (hasGroupBy || !hasAggregations) {
return Collections.emptyList();
}
Object[] data = generateReturnData(selectStatementContext);
return Collections.singletonList(new MemoryQueryResultRow(data));
}
List<MemoryQueryResultRow> result = new ArrayList<>(dataMap.values());
Expand Down

0 comments on commit e3c49db

Please sign in to comment.