-
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 tests for Presto comparison functions for custom types with custo…
…m comparison functions (#11019) Summary: Pull Request resolved: #11019 #11015 added support for custom types to provide custom comparison functions, motivated by the need to support TimestampWithTimezone's comparison semantics. I validated the UDFs provided in Comparisons.h on top of this change. It does not look like any further changes are needed in those files, but I added explicit tests for TimestampWithTimezone in the various comparison UDFs. I also added tests for the UDFs that support Generic arguments, to ensure that when the Type underlying the Generic provides custom comparison functions, that is respected. I considered adding checks to the UDFs that support templated arguments to ensure the type does not provide custom comparison functions, as these are not supported in any of them (e.g. between, <, >, and the SIMD versions of comparison functions). However, someone would have to explicitly register these functions for the custom type, and I don't think it's unreasonable to expect the user to test these functions work as expected when doing so, I don't think the per-batch check is worth the (admittedly small) overhead. Differential Revision: D62893143
- Loading branch information
1 parent
a34cad5
commit c7b46a9
Showing
1 changed file
with
130 additions
and
0 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