-
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.
misc: Add support for TimestampWithTimeZone in AggregationFuzzer (#11897
) Summary: Pull Request resolved: #11897 This change adds support for TimestampWithTimeZone in AggregationFuzzer as partition keys (it cannot be a sorting key as it does not support +/-) with PrestoQueryRunner. The primary challenge is that PrestoQueryRunner does not support TimestampWithTimeZone as an input (it's not supported in DWRF). To address this the general strategy is when we see a TimestampWithTimeZone in the input types we convert it to a BIGINT millisUtc and VARCHAR time_zone and then call from_unixtime as part of an initial projection in the query to produce TimestampWithTimeZone values. More concretely I added a general purpose utility library PrestoQueryRunnerIntermediateTypeTransforms to handle converting Vectors of intermediate only types (custom types not supported in the input) to Vectors of types supported in the input, and to generate expressions to do the conversion back to the intermediate only type as part of the query. This is supported when the types are nested in complex types as well. I added a function inputProjections to ReferenceQueryRunner which takes in the input batch and does this conversion and generates the expressions. The rest of this change is just plumbing these projections into all plans throughout AggregationFuzzer, as well as the plans generated in the ResultVerifiers. If this approach is acceptable, it's straight forward to then support custom types like TimestampWithTimeZone as arguments to aggregates in the fuzzer, as well as add support in other fuzzers like JoinFuzzer. Differential Revision: D67346942
- Loading branch information
1 parent
ebcb021
commit 61e7dbc
Showing
19 changed files
with
695 additions
and
47 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.