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

Fix some bugs involving union and coalescing of optional values #6590

Merged
merged 5 commits into from
Dec 13, 2023

Commits on Dec 11, 2023

  1. Fix some bugs involving union and coalescing of optional values

    There are a number of places that improperly handle a set that has
    multiple NULL values in it:
     * INSERT on single values
     * UPDATE on single values
     * assert_single
    
    The assert_single case is a long standing bug that can be triggered
    without much trouble. The INSERT/UPDATE bugs are new, and stem from
    the new ?? on DML, since I think it that was the first thing in the
    compiler backend where extra NULLS might be produced for something
    with single cardinality.
    
    Fix this by adding null checks at the consumer sites. One of the
    consumer sites is set_as_subquery, and I modified update to always use
    that.
    I also added a helper function to add the null checks, and I'll be
    going back and changing lots of other code to use the helper.
    
    We could also flip this around a bit and try saying that we shouldn't
    ever produce extra NULLs in a single set, and try to stamp it out on
    the producer side, though that seems a little less consistent to me?
    
    Fixes #6438.
    msullivan committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    cbd3622 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. revert

    msullivan committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    b9ee3fa View commit details
    Browse the repository at this point in the history
  2. partial restore

    msullivan committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    e18e71e View commit details
    Browse the repository at this point in the history
  3. move card_inference_override to SelectStmt from Set

    this will make it easier to inject the filter on the backend
    msullivan committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    35b4740 View commit details
    Browse the repository at this point in the history
  4. Add NULL checks to select

    msullivan committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    01618e8 View commit details
    Browse the repository at this point in the history