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 issues due to mask aliasing #15680

Merged
merged 2 commits into from
Jan 17, 2023
Merged

Fix issues due to mask aliasing #15680

merged 2 commits into from
Jan 17, 2023

Commits on Jan 17, 2023

  1. Disallow multiple masks on a given column

    This is problematic because:
    * There is no guarantee about the ordering of application of masks,
      which could result in non-deterministic results at best or
      query failures in the worst case
    * Allowing multiple masks, especially when provided by different
      connectors, means that one cannot reason about a mask expression
      in isolation with respect to the input the expression expects.
    martint committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    d95101b View commit details
    Browse the repository at this point in the history
  2. Fix aliasing of fields in mask expressions

    This causes two problems:
    * Masks can inadvertently refer to columns that appear earlier
      in the list of columns as the projection is planned. This
      causes the mask expression to see the masked value of other columns
      instead of the underlying value
    * A possible bug in other optimizers causes mask expressions to be
      lost when the result of a such an expression is of type ROW
      and there's a dereference of a field downstream
    martint committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    fc57354 View commit details
    Browse the repository at this point in the history