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

Support Custom Comparison in Simple Function API #11136

Closed

Commits on Sep 30, 2024

  1. Configuration menu
    Copy the full SHA
    dbb512c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ecbac53 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ea008c1 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Support Custom Comparison in Simple Function API

    Summary:
    This change extends CustomType in the Simple Function API, templating it on
    providesCustomComparison, with the idea that Custom Types that provide custom
    comparison operators will set this value to true when they define their CustomType
    template overrides.
    
    In Simple Functions, this allows us to wrap the value in a view, called
    CustomTypeWithCustomComparisonView, which overrides the standard comparison
    operators and hash function to use the operators provided by the Type.  It also provides a
    dereference operator to access the raw underlying value.
    
    The only other piece to this diff is adding a VectorReader that constructs the
    CustomTypeWithCustomComparisonView.
    
    This should help address facebookincubator#8713
    so we don't have to create special flavors of UDF just for TimestampWithTimezone.
    
    On a side note, if we extend this so that if a Custom Type does not provide custom
    comparison operators we produce a similar view without the custom comparison operators,
    that would likely solve the issue with custom types and the simple function interface
    entirely.
    
    In the follow up diff, I'll clean up the TimestampWithTimezone UDFs for comparisons and
    greatest/least.
    
    Differential Revision: D63670301
    Kevin Wilfong authored and facebook-github-bot committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    9109702 View commit details
    Browse the repository at this point in the history