Skip to content

[BUG] Func delegate Filter in Tableclient.QueryAsync does not support Equals(x, StringComparison) method #49847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arsamigullin opened this issue May 6, 2025 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Tables

Comments

@arsamigullin
Copy link

arsamigullin commented May 6, 2025

Library name and version

Azure.Data.Tables 12.10.0

Describe the bug

Before upgrading Azure.Data.Tables to 12.10.0 we used 12.8.3 version where this code worked without errors

Tableclient.QueryAsync(x=>x.Equals("test", StringComparison.OrdinalIgnoreCase), null, columns, cancellationToken)

After upgrading to 12.10.0 we started seeing this error

"message": "Equals method with more than two arguments is not supported.",
"type": "System.NotSupportedException",

Expected behavior

This code works without error when using Azure.Data.Tables, Version=12.10.0

Tableclient.QueryAsync<T>(x=>x.Equals("test", StringComparison.OrdinalIgnoreCase), null, columns, cancellationToken)

Actual behavior

After upgrading to Azure.Data.Tables to 12.10.0 we started seeing this error

"message": "Equals method with more than two arguments is not supported.",
"type": "System.NotSupportedException",

StackTrace:

{
"assembly": "Azure.Data.Tables, Version=12.10.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8",
"method": "Azure.Data.Tables.Queryable.ExpressionNormalizer.VisitMethodCallNoRewrite",
"level": 0,
"line": 0
},
{
"assembly": "Azure.Data.Tables, Version=12.10.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8",
"method": "Azure.Data.Tables.Queryable.ExpressionNormalizer.VisitMethodCall",
"level": 1,
"line": 0
},
{
"assembly": "System.Linq.Expressions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"method": "System.Linq.Expressions.ExpressionVisitor.VisitBinary",
"level": 2,
"line": 0
},
{
"assembly": "Azure.Data.Tables, Version=12.10.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8",
"method": "Azure.Data.Tables.Queryable.ExpressionNormalizer.VisitBinary",
"level": 3,
"line": 0
},
{
"assembly": "System.Linq.Expressions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"method": "System.Linq.Expressions.ExpressionVisitor.VisitLambda",
"level": 4,
"line": 0
},
{
"assembly": "Azure.Data.Tables, Version=12.10.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8",
"method": "Azure.Data.Tables.TableClient.Bind",
"level": 5,
"line": 0
},
{
"assembly": "Azure.Data.Tables, Version=12.10.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8",
"method": "Azure.Data.Tables.TableClient.QueryAsync",
"level": 6,
"line": 0
}

Reproduction Steps

Pass filter Func delegate

x=>x.Equals("test", StringComparison.OrdinalIgnoreCase)

to the Tableclient.QueryAsync, i.e.

Tableclient.QueryAsync<T>(x=>x.Equals("test", StringComparison.OrdinalIgnoreCase), null, columns, cancellationToken)

Environment

No response

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 6, 2025
@jsquire jsquire self-assigned this May 7, 2025
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Tables labels May 7, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label May 7, 2025
@jsquire
Copy link
Member

jsquire commented May 7, 2025

Hi @arsamigullin. Thanks for reaching out and we regret that you're experiencing difficulties. This is by design. As discussed in #49675, the previous version accepted the comparison argument and then ignored it:

The error you are seeing is by design and is a breaking change in the 12.10.0 version of the SDK as noted in the CHANGELOG. Previously, the StringComparison argument was silently ignored as the Azure Table service does not support these methods in a query filter. The linked CHANGELOG has instructions to configure the SDK to not throw to match the behavior prior to version 12.10.0, if you wish to do so.

Otherwise, you will need to perform a case sensitive search and filter the items locally.

Please see #49675 for additional context and discussion.

@jsquire jsquire added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label May 7, 2025
Copy link

github-actions bot commented May 7, 2025

Hi @arsamigullin. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

Copy link

Hi @arsamigullin, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Tables
Projects
None yet
Development

No branches or pull requests

2 participants