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

[Expression] Do not transform NULL integer as 0 when concat #36521

Merged
merged 2 commits into from
May 18, 2020

Conversation

troopa81
Copy link
Contributor

Description

Fixes #36112

Providers returns QVariant ( QVariant::Int ) for null integer, which converts to "0" as a string. This PR proposes to not concat null values.

The issue doesn't occured for OGR data (GPKG for instance) because this provider returns a null QString for any null values while others provider don't (spatialite, postgres, delimitedtext)

tests/src/core/testqgsexpression.cpp Outdated Show resolved Hide resolved
tests/src/core/testqgsexpression.cpp Show resolved Hide resolved
@nyalldawson nyalldawson merged commit 01563e6 into qgis:master May 18, 2020
@nyalldawson
Copy link
Collaborator

Travis is just being vindictive here -- he knows Github Actions is gunning for his job, so he's being petty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using concat(field1, field2) concatenates 0 instead of empty string ('') if any of the fields is NULL
3 participants