Skip to content

Querying for n < x does not return all records that it should #6527

@rickfero

Description

@rickfero

Checkboxes for prior research

Describe the bug

  const command = new ScanCommand({
      TableName: 'Message',
      FilterExpression: '#version < :version',
      ExpressionAttributeNames: {
        '#version': '_lastInspectionVersion',
      },
      ExpressionAttributeValues: {
        ':version': { N: '1' },
      },
    });

  const response = await this.Client.send(command);

returns only 1 item

image

When looking in the same database (the only database I have) I can see there are way more than one

image

In general any query that queries on a number does not return all records.

Using "@aws-sdk/client-dynamodb": "^3.656.0",

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

"@aws-sdk/client-dynamodb": "^3.656.0",

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v20.14.0

Reproduction Steps

const command = new ScanCommand({
TableName: 'Message',
FilterExpression: '#version < :version',
ExpressionAttributeNames: {
'#version': '_lastInspectionVersion',
},
ExpressionAttributeValues: {
':version': { N: '1' },
},
});

const response = await this.Client.send(command);

Observed Behavior

One record returned

Expected Behavior

Over 1000 records returned

Possible Solution

?

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions