Skip to content

Conversation

@jepbarasgarov
Copy link
Contributor

While using row-based IS {,NOT} NULL, especially after doing LEFT JOIN we need to be very carefull as:

  1. IS NULL = true if the row is NULL OR all columns are NULL1
  2. IS NOT NULL = true if the row is NOT NULL AND all columns are NOT NULL1

So for making it safe, we used t2.<column> IS NOT NULL instead of t2 IS NOT NULL when the was used while joining

ref: https://github.com/odoo/upgrade/pull/8957

Footnotes

  1. https://www.postgresql.org/docs/12/functions-comparison.html 2

While using row-based `IS {,NOT} NULL`, especially after doing
LEFT JOIN we need to be very carefull as:
1. IS NULL = true if the `row is NULL OR all columns are NULL`[^1]
2. IS NOT NULL = true if the `row is NOT NULL AND all columns are NOT
   NULL`[^1]

So for making it safe, we used `t2.<column> IS NOT NULL` instead
of `t2 IS NOT NULL` when the <column> was used while joining

ref: odoo/upgrade#8957

[^1]: https://www.postgresql.org/docs/12/functions-comparison.html
@jepbarasgarov jepbarasgarov requested review from a team, KangOl and aj-fuentes December 1, 2025 10:05
@robodoo
Copy link
Contributor

robodoo commented Dec 1, 2025

Pull request status dashboard

@KangOl
Copy link
Contributor

KangOl commented Dec 1, 2025

upgradeci retry with always only account crm hr project

Copy link
Contributor

@KangOl KangOl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants