Skip to content

When numbers become LONG search won't match records #125

@jeffryan

Description

@jeffryan

If data being searched contains numeric values that are large enough to become LONG (depends on sys.maxint of the platform) then jmespath.search can't find them. To illustrate lets consider the following simple query that works:

>>> jmespath.search('[?b > `2`]', [{"a": 1, "b": 2}, {"a": 1, "b": 3}])
[{'a': 1, 'b': 3}]

Then simply convert the numeric data type of the field being searched to long and note the result is no longer found:

>>> jmespath.search('[?b > `2`]', [{"a": 1, "b": 2}, {"a": 1, "b": 3L}])
[]

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