[QGIS-Developer] Handling NULL differs in concat vs || in expressions: let's remove ||

Richard Duivenvoorde rdmailings at duif.net
Sun Jan 26 23:11:18 PST 2020


On 27/01/2020 07.29, Nyall Dawson wrote:
> On Sat, 25 Jan 2020 at 19:32, Richard Duivenvoorde <rdmailings at duif.net> wrote:
>>
>> Hi Devs,
>>
>> tldr; should the '||'-button in QGIS expressions not either behave like
>> a real 'String concat' function,
>> or
>> as a logical OR
>> or
>> be removed?   <= my favourite
> 
> Massive -1. Just because something is complex, doesn't make it wrong!

It's not complex, it is not behaving as most people think it is, or are
familiar with AND there is not 'help' for these buttons (in contrast
with the functions, where you could describe this behaviour).

As said, it was my frustration (as in: instead of just 'using' I ended
up trying and testing) that I "lost" labels just because whole records
were ignorred, because certain columns had NULL values, and I ended up
with an overly complex expression which tested IF the value was NULL.

It's when I thought it was a bug that I found that other people, also
had been there, AND found that there was another 'concat' function
behaving a little different.

In general I prefer a single intuitive working way of doing things, do I
agree that 'intuitive' is very personal :-(

Regards,

Richard Duivenvoorde


More information about the QGIS-Developer mailing list