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

opt: nil presentation should not equal the 0-column presentation #39818

Merged
merged 2 commits into from
Aug 23, 2019

Commits on Aug 22, 2019

  1. sql: enhance apply execbuilder error

    We have seen a series of bugs where the execbuilder hits an assertion
    error inside Apply. This change adds a detail to the error containing
    the formatted opt tree.
    
    Release note: None
    RaduBerinde committed Aug 22, 2019
    Configuration menu
    Copy the full SHA
    91351fd View commit details
    Browse the repository at this point in the history
  2. opt: nil presentation should not equal the 0-column presentation

    The nil presentation means that we want all columns in no particular
    order, whereas the 0-column presentation means that we don't need any
    of the columns (e.g. EXISTS subqueries). Only the nil presentation
    is `Any()`. But `Equals()` was incorrectly treating these as equal.
    This confused the interner and a nil presentation became a 0-column
    presentation which led to some internal errors in Apply.
    
    For completeness, we also fix `HashPhysProps` to differentiate
    between these two, but note that this isn't required for correctness.
    
    Fixes cockroachdb#39435.
    
    Release note (bug fix): Fixed internal errors generated during
    execution of some complicated cases of correlated subqueries.
    RaduBerinde committed Aug 22, 2019
    Configuration menu
    Copy the full SHA
    9d04015 View commit details
    Browse the repository at this point in the history