Commit 9aab260
[SPARK-53868][SQL] Only use signature with Expression[] of
### What changes were proposed in this pull request?
#50143 This PR introduced `visitAggregateFunction` with `inputs: Array[Expression]`, but it's not the only usage of `visitAggregateFunction` for example here
https://github.com/apache/spark/blob/6eb4d3c9d38f6849b0acfcffdbadce03c8f49ac6/sql/catalyst/src/main/java/org/apache/spark/sql/connector/util/V2ExpressionSQLBuilder.java#L134
the old API is still used but it no longer checked if the function is supported.
This means that if some dialect did not support one of `(MIN, MAX, COUNT, SUM, AVG)` it would not be blocked, but as of now all the dialects have them in the `supportedFunctions` so this is not a behavioral change.
### Why are the changes needed?
To unify the API in case in the future if some dialect does not support an aggregate function of `(MIN, MAX, COUNT, SUM, AVG)` it should be blocked.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Existing tests.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #52573 from alekjarmov/block-aggregates.
Lead-authored-by: alekjarmov <[email protected]>
Co-authored-by: Alek Jarmov <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>visitAggregateFunction in V2ExpressionSQBuilder1 parent 418cf56 commit 9aab260
File tree
1 file changed
+18
-12
lines changed- sql/catalyst/src/main/java/org/apache/spark/sql/connector/util
1 file changed
+18
-12
lines changedLines changed: 18 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
136 | 135 | | |
137 | | - | |
138 | | - | |
| 136 | + | |
139 | 137 | | |
140 | | - | |
141 | | - | |
| 138 | + | |
142 | 139 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
147 | 143 | | |
148 | | - | |
149 | | - | |
| 144 | + | |
150 | 145 | | |
151 | 146 | | |
152 | 147 | | |
| |||
282 | 277 | | |
283 | 278 | | |
284 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
285 | 287 | | |
286 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
287 | 293 | | |
288 | 294 | | |
289 | 295 | | |
| |||
0 commit comments