[BUG] Getting odata.error "InvalidInput" when using Azurite and oData syntax with 'and' filter expression
See original GitHub issueLibrary name and version
Azure.Data.Tables
Describe the bug
I use Azurite for local development.
I run this query. The two variables userName and userPW came from a query string (e.g. http://192.168.1.54:7015/api/Command?Login&userName=Peter&userPW=abc). I’m using Azure functions.
The following code runs via “await Task.Run(() => [class-instance].[methodname]”)
The weird is, when I hardcode the String “User eq ‘Peter’ and Password eq 'abc” it works fine and I got 1 result. But if I insert the variables, I’m getting the odata.error.
Pageable<TableEntity> oDataQueryEntities = tableClient.Query<TableEntity> (filter: TableClient.CreateQueryFilter($"User eq '{userName}' and Password eq '{userPW}'"));
If I omit the second parameter, I’m also getting a result:
(filter: TableClient.CreateQueryFilter($"User eq '{userName}'"));
The table is there if I check it with the Storage Explorer.
Expected behavior
See above
Actual behavior
See above
Reproduction Steps
See above
Environment
Win10 Visual Studio Community 2022 17.6.2 Azure.Data.Tables 12.8.0 Azurite 3.22.0
Issue Analytics
- State:
- Created 4 months ago
- Comments:8 (2 by maintainers)
Top GitHub Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Hi @jk-85, since you haven’t asked that we
/unresolve
the issue, we’ll close this out. If you believe further discussion is needed, please add a comment/unresolve
to reopen the issue.