Skip to content

Null cannot be used in property expressions on Android #3985

@mjaakko

Description

@mjaakko

Is your feature request related to a problem? Please describe.
Yes. I need to get the first non-null and non-empty string from a list of values to use localized labels on the map. Unfortunately in the data source I'm using, missing values can either be null or an empty string. coalesce operator could be used to get rid of nulls, but that won't for empty strings. case operator could be used to map empty strings to nulls, but it's not possible to use nulls in expressions

Describe the solution you'd like
Allow using nulls in expressions, e.g. Expression.null() or Expression.literal(null)

Describe alternatives you've considered
Using a nested case expression with all, has and != works in this case, but it becomes quite clunky with more complex conditions

Additional context
mjaakko/NeoStumbler#941

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions