Skip to content

Wrong result when using a filter expression on a non-existing child array #1089

Description

@LiorKogan

RedisJSON 2.6.6

redis> JSON.SET x $ '{"a":[1,2,3]}'
OK
redis> JSON.GET x '$.a[0][?(@==1)]'
"[1]"

Expected

redis> JSON.GET x '$.a[0][?(@==1)]'
"[]"

Another example:

redis> JSON.GET x '$.a[0][?(@==@)][?1][?2][?3]'
"[1]"

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