diff options
author | William Benton <willb@redhat.com> | 2014-07-23 16:25:32 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-07-23 16:25:32 -0700 |
commit | e060d3ee2d910a5a802bb29630dca6f66cc0525d (patch) | |
tree | 766d3ece33ff5955d8b0ffafb824beee5b7f459e /sql/hive/src/test/resources/golden/having-7-5ad96cb287df02080da1e2594f08d83e | |
parent | 91903e0a50b0efb7217610021a628b3043004d82 (diff) | |
download | spark-e060d3ee2d910a5a802bb29630dca6f66cc0525d.tar.gz spark-e060d3ee2d910a5a802bb29630dca6f66cc0525d.tar.bz2 spark-e060d3ee2d910a5a802bb29630dca6f66cc0525d.zip |
SPARK-2226: [SQL] transform HAVING clauses with aggregate expressions that aren't in the aggregation list
This change adds an analyzer rule to
1. find expressions in `HAVING` clause filters that depend on unresolved attributes,
2. push these expressions down to the underlying aggregates, and then
3. project them away above the filter.
It also enables the `HAVING` queries in the Hive compatibility suite.
Author: William Benton <willb@redhat.com>
Closes #1497 from willb/spark-2226 and squashes the following commits:
92c9a93 [William Benton] Removed unnecessary import
f1d4f34 [William Benton] Cleanups missed in prior commit
0e1624f [William Benton] Incorporated suggestions from @marmbrus; thanks!
541d4ee [William Benton] Cleanups from review
5a12647 [William Benton] Explanatory comments and stylistic cleanups.
c7f2b2c [William Benton] Whitelist HAVING queries.
29a26e3 [William Benton] Added rule to handle unresolved attributes in HAVING clauses (SPARK-2226)
Diffstat (limited to 'sql/hive/src/test/resources/golden/having-7-5ad96cb287df02080da1e2594f08d83e')
-rw-r--r-- | sql/hive/src/test/resources/golden/having-7-5ad96cb287df02080da1e2594f08d83e | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/sql/hive/src/test/resources/golden/having-7-5ad96cb287df02080da1e2594f08d83e b/sql/hive/src/test/resources/golden/having-7-5ad96cb287df02080da1e2594f08d83e new file mode 100644 index 0000000000..bd545ccf74 --- /dev/null +++ b/sql/hive/src/test/resources/golden/having-7-5ad96cb287df02080da1e2594f08d83e @@ -0,0 +1,125 @@ +302 +305 +306 +307 +308 +309 +310 +311 +315 +316 +317 +318 +321 +322 +323 +325 +327 +331 +332 +333 +335 +336 +338 +339 +341 +342 +344 +345 +348 +351 +353 +356 +360 +362 +364 +365 +366 +367 +368 +369 +373 +374 +375 +377 +378 +379 +382 +384 +386 +389 +392 +393 +394 +395 +396 +397 +399 +400 +401 +402 +403 +404 +406 +407 +409 +411 +413 +414 +417 +418 +419 +421 +424 +427 +429 +430 +431 +432 +435 +436 +437 +438 +439 +443 +444 +446 +448 +449 +452 +453 +454 +455 +457 +458 +459 +460 +462 +463 +466 +467 +468 +469 +470 +472 +475 +477 +478 +479 +480 +481 +482 +483 +484 +485 +487 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 |