Skip to content

Commit

Permalink
Review contd.
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotrashivam committed Jan 30, 2025
1 parent 4193f59 commit ebbc6a8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,17 @@ private RowSet computeIndex(@NotNull final RowGroup[] rowGroups) {
@NotNull
public List<String[]> getDataIndexColumns() {
initialize();
final Map<String, GroupingColumnInfo> localGroupingColumns = groupingColumns;
if (tableInfo.dataIndexes().isEmpty() && localGroupingColumns.isEmpty()) {
if (tableInfo.dataIndexes().isEmpty() && groupingColumns.isEmpty()) {
return List.of();
}
final List<String[]> dataIndexColumns =
new ArrayList<>(tableInfo.dataIndexes().size() + localGroupingColumns.size());
new ArrayList<>(tableInfo.dataIndexes().size() + groupingColumns.size());
// Add the data indexes to the list
tableInfo.dataIndexes().stream()
.map(di -> di.columns().toArray(String[]::new))
.forEach(dataIndexColumns::add);
// Add grouping columns to the list
localGroupingColumns.keySet().stream().map(colName -> new String[] {colName}).forEach(dataIndexColumns::add);
groupingColumns.keySet().stream().map(colName -> new String[] {colName}).forEach(dataIndexColumns::add);
return dataIndexColumns;
}

Expand Down

0 comments on commit ebbc6a8

Please sign in to comment.