Open
Description
What is the bug or the crash?
When evaluating a boolean expression such as "Field_A" IS NULL
, the expression editor will show the result as either 1
or 0
. This value appears to be an integer, but does not behave like one. Math, for instance, cannot be done against this value. These expressions will need to be converted with to_int()
first (which is confusing because why would I need to convert 0 or 1 to an integer, it "already is one").
This is inconsistent with other aspects of the expression editor where some boolean operations will result in true
or false
explicitly (such as overlay_within()
)
I think the ideal solution would be to fix the integer-like returning expressions to instead return true
or false
explicitly.
Steps to reproduce the issue
- Create an expression such as
"Field" IS NULL + 10
- Notice the value is not either 10 or 11.
Versions
QGIS version | 3.44.0-Solothurn |
QGIS code revision | 5d9ba037df1 |
Libraries | |
Qt version | 5.15.13 |
Python version | 3.12.11 |
GDAL version | 3.11.0 (Compiled) 3.11.3 (Running) — Eganville |
PROJ version | 9.6.2 |
EPSG Registry database version | v12.013 (2025-05-26) |
GEOS version | 3.13.1-CAPI-1.19.2 |
SQLite version | 3.46.1 |
PDAL version | 2.9.0 |
PostgreSQL client version | 17.3 |
SpatiaLite version | 5.1.0 |
QWT version | 6.3.0 |
QScintilla2 version | 2.14.1 |
OS version | Windows 11 Version 2009 |
Active Python plugins | |
db_manager | 0.1.20 |
grassprovider | 2.12.99 |
processing | 2.12.99 |
Supported QGIS version
- I'm running a supported QGIS version according to the roadmap.
New profile
- I tried with a new QGIS profile
Additional context
No response