Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for Presto's map_subset UDF with TimestampWithTimezones #11242

Closed

Commits on Oct 11, 2024

  1. Add support for custom comparison in map subscript and Presto's eleme…

    …nt_at UDF (facebookincubator#11239)
    
    Summary:
    
    Update SubscriptUtil to work with types that provide custom comparison. We can
    reuse the implementation for complex types, since that just uses the compare
    function provided by the Vector. With
    facebookincubator#11022 this just invokes the Type's
    custom implementation.
    
    Since they share the same underlying code this makes both map subscript and
    the element_at UDF work with custom comparison.
    
    Reviewed By: xiaoxmeng
    
    Differential Revision: D64256363
    Kevin Wilfong authored and facebook-github-bot committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    5e99efa View commit details
    Browse the repository at this point in the history
  2. Add tests for Presto's map_subset UDF with TimestampWithTimezones

    Summary:
    Presto's map_subset implementation for Generic types uses the hash and equals
    functions implemented for GenericViews.  For TimestampWithTImeZone this
    recursively calls these functions on the CustomTypeWithCustomComparisonView the
    GenericView wraps, which supports custom comparison operators. So this UDF works
    as is with the recent changes earlier in this stack.
    
    Adding unit tests to verify this and ensure it doesn't break in the future.
    
    Differential Revision: D64262952
    Kevin Wilfong authored and facebook-github-bot committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    7a958d1 View commit details
    Browse the repository at this point in the history