このコミットが含まれているのは:
2026-10-31 04:08:05 +09:00
コミット 6a0f1ec819
23個のファイルの変更、188行の追加、57行の削除
+1 -1
ファイルの表示
@@ -49,7 +49,7 @@ class CountsPivotTotals
leaf = retained.map { @axes.expressions[_1] }
selected = leaf.each_with_index.map { |expression, index| "#{ expression } AS k#{ index }" }
inner = scope.group(*leaf.map { Arel.sql(_1) })
.select(Arel.sql((selected + ['COUNT(DISTINCT v.id) AS count']).join(', '))).to_sql
.select(Arel.sql((selected + ["#{ @axes.count_expression } AS count"]).join(', '))).to_sql
coordinates = indexes.map { "k#{ retained.index(_1) }" }
projected = coordinates.each_with_index.map { |key, index| "#{ key } AS v#{ index }" }
output = ["#{ row_depth } AS row_depth", "#{ column_depth } AS column_depth"] +