Skip to content

Conversation

@jagadeesh-00
Copy link

Description

  • When query fields contains any reserved keywords, the query is giving 400 error with below ValidationException
Screenshot 2025-09-15 at 9 47 39 AM

Related Issues

Issue: #166

How Has This Been Tested

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Screenshots (if appropriate)

cursor[bot]

This comment was marked as outdated.

@jagadeesh-00 jagadeesh-00 changed the title Jagadeesh/fix/reserved keywords in fields fix: reserved keywords in fields Sep 16, 2025
@jagadeesh-00 jagadeesh-00 changed the title fix: reserved keywords in fields fix: reserved keywords in query fields Sep 16, 2025
});

tableParams.ExpressionAttributeNames = expressionAttributeNames;
tableParams.ProjectionExpression = projectionFieldAliases.join(',');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Projection Alias Case Sensitivity Issue

The new projection alias generation creates non-unique aliases by uppercasing field names. This causes ExpressionAttributeNames collisions when projection fields differ only by case, or when they match existing aliases from where conditions or partition/sort keys. These overwrites lead to incorrect field projections or break KeyConditionExpression/FilterExpression references, causing data loss or query failures.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant