MCPcopy Create free account
hub / github.com/apache/datafusion / count_aggregated_cube

Function count_aggregated_cube

datafusion/core/tests/sql/aggregates/basic.rs:107–176  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106#[tokio::test]
107async fn count_aggregated_cube() -> Result<()> {
108 let results = execute_with_partition(
109 "SELECT c1, c2, count(c3) FROM test GROUP BY CUBE (c1, c2) ORDER BY c1, c2",
110 4,
111 )
112 .await?;
113
114 assert_snapshot!(batches_to_sort_string(&results), @r"
115 +----+----+----------------+
116 | c1 | c2 | count(test.c3) |
117 +----+----+----------------+
118 | | | 40 |
119 | | 1 | 4 |
120 | | 10 | 4 |
121 | | 2 | 4 |
122 | | 3 | 4 |
123 | | 4 | 4 |
124 | | 5 | 4 |
125 | | 6 | 4 |
126 | | 7 | 4 |
127 | | 8 | 4 |
128 | | 9 | 4 |
129 | 0 | | 10 |
130 | 0 | 1 | 1 |
131 | 0 | 10 | 1 |
132 | 0 | 2 | 1 |
133 | 0 | 3 | 1 |
134 | 0 | 4 | 1 |
135 | 0 | 5 | 1 |
136 | 0 | 6 | 1 |
137 | 0 | 7 | 1 |
138 | 0 | 8 | 1 |
139 | 0 | 9 | 1 |
140 | 1 | | 10 |
141 | 1 | 1 | 1 |
142 | 1 | 10 | 1 |
143 | 1 | 2 | 1 |
144 | 1 | 3 | 1 |
145 | 1 | 4 | 1 |
146 | 1 | 5 | 1 |
147 | 1 | 6 | 1 |
148 | 1 | 7 | 1 |
149 | 1 | 8 | 1 |
150 | 1 | 9 | 1 |
151 | 2 | | 10 |
152 | 2 | 1 | 1 |
153 | 2 | 10 | 1 |
154 | 2 | 2 | 1 |
155 | 2 | 3 | 1 |
156 | 2 | 4 | 1 |
157 | 2 | 5 | 1 |
158 | 2 | 6 | 1 |
159 | 2 | 7 | 1 |
160 | 2 | 8 | 1 |
161 | 2 | 9 | 1 |
162 | 3 | | 10 |
163 | 3 | 1 | 1 |
164 | 3 | 10 | 1 |

Callers

nothing calls this directly

Calls 1

execute_with_partitionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…