-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support in AggregationFuzzer to compare against reference DB for …
…non deterministic functions on unsorted inputs (#9009) Summary: **Why** Currently for aggregate functions with custom verifiers, we do not verify plans against the reference db. This is because for these functions the reference db results differ and require us to use custom verifiers - typically the ResultVerifier::compare api. The compare api requires VeloxVectors and previously the results of the reference query runner were in materialized row format and thus couldnt be called. Recently support was added to return the reference db results as velox vectors (#8880). With this we can now validate functions which require custom verifiers. **What** We add support in the AggregationFuzzer to use the new 'executeVector' api if supported by the refrence query runner, and use that to validate non deterministic functions that require a custom verifier. **Results** Currently with this change we have increased the number of plans being verified against reference db from 40 % to 80+%. ``` Total masked aggregations: 78 (14.58%) Total global aggregations: 41 (7.66%) Total group-by aggregations: 392 (73.27%) Total distinct aggregations: 49 (9.16%) Total aggregations over distinct inputs: 40 (7.48%) Total window expressions: 53 (9.91%) Total functions tested: 38 Total iterations requiring sorted inputs: 43 (8.04%) Total iterations verified against reference DB: 448 (83.74%) Total functions not verified (verification skipped / not supported by reference DB / reference DB failed): 53 (9.91%) / 6 (1.12%) / 3 (0.56%) Total failed functions: 27 (5.05%) ``` Experimental runs : https://github.com/facebookincubator/velox/actions/runs/8199583642/job/22443872635 https://github.com/facebookincubator/velox/actions/runs/8199583642/job/22424917125 **Notes** Certain functions have been skiplisted for following reasons: 1. map_union_sum : This requires us to use the lates presto due to a bug on Presto end in version .284 not supporting reals. 2. approx_set: Signatures supported by Velox are more than supported by Presto 3. min_by, max_by: Requires custom verifiers (order by not supported by Presto) 4. any_value: alias for arbitrary but this alias isnt present in Presto. Pull Request resolved: #9009 Reviewed By: kagamiori Differential Revision: D54911135 Pulled By: kgpai fbshipit-source-id: e2fc1fc91a367eb1a3538aa87e755e31ae1018a6
- Loading branch information
1 parent
8f95208
commit 03d017f
Showing
5 changed files
with
138 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters