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

DM-45680: Allow boolean columns to be used in query 'where' #1051

Merged
merged 6 commits into from
Aug 12, 2024

Commits on Aug 10, 2024

  1. Allow boolean columns to be used in where strings

    Fix an issue where boolean metadata columns (like exposure.can_see_sky and exposure.has_simulated) were not usable in "where" clauses for Registry query functions.
    
    These column names can now be used as a boolean expression, for example `where="exposure.can_see_sky"` or `where="NOT exposure.can_see_sky"`.
    dhirving committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    7effbe8 View commit details
    Browse the repository at this point in the history
  2. Move boolean column tests to queries test file

    We need roughly the same test for both registry and the new query system, so move it out of the registry tests to a place where we have access to both query systems.
    dhirving committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    3373bbc View commit details
    Browse the repository at this point in the history
  3. Allow boolean columns to be used in ExpressionFactory

    Add an as_boolean() method to the expression proxies used to reference dimension fields, so boolean-valued fields can be converted to Predicate instances that can be used to constrain a query.
    dhirving committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    89c4334 View commit details
    Browse the repository at this point in the history
  4. Add ExpressionFactory support for null boolean columns

    Boolean columns in the DB are always nullable (and exposure.can_see_sky has many NULLs in the real databases.)  So add a way to search for them in the query system.
    dhirving committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    d740e47 View commit details
    Browse the repository at this point in the history
  5. Add expression string syntax for null boolean columns

    Add support for `= NULL` and `!= NULL` syntax for boolean columns in query where strings.
    dhirving committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    ff10942 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7aa86be View commit details
    Browse the repository at this point in the history