Skip to content

"NOT" predicate also excludes NULL values #244

Open
@ManonGros

Description

@ManonGros

This is rather counter intuitive. For example, in this download: https://www.gbif.org/occurrence/download/0233791-200613084148143, the user wanted to exclude invasive species:

{
      "type": "not",
      "predicate": {
        "type": "equals",
        "key": "ESTABLISHMENT_MEANS",
        "value": "INVASIVE",
        "matchCase": false
      }
    }

But I don't think he realises that this also excluded all the records for which the establishment mean isn't provided.

The NOT predicate should also return NULL values (https://stackoverflow.com/questions/5658457/not-equal-operator-on-null):
establishmentMeans != 'INVASIVE' OR establishmentMeans IS NULL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions