Closed trevonmckay closed 4 years ago
Same issue with Microsoft.Azure.Cosmos.Table
v1.0.7
I am also seeing this when I use Microsoft.OData.Core (and related packages Microsoft.OData.Edm and Microsoft.Spatial) version 7.6.1 and above. Using 7.6.0 I do not have this problem.
@iant-ee that's right, in my case it was Microsoft.OData.Core 7.6.4
@Badabum Are you saying that it was working for you with 7.6.3? Or just that you first saw it when upgrading to 7.6.4 (from some older version, presumably earlier than 7.6.1)? I'm currently looking at the changelog for 7.6.1 to see I can spot the change the caused this.
It was 7.6.0 -> 7.6.4 update
Looking at the changes in 7.6.1: https://github.com/OData/odata.net/compare/7.6.0...7.6.1
The breaking change appears to be https://github.com/OData/odata.net/pull/1488 & https://github.com/OData/odata.net/pull/1532 Support nested query options ($filter, $orderby, $top, $skip, $count, $search, $select, $compute) in $select clause.
@trevonmckay We've updated the OData dependency versions to 7.6.4 in Tables v1.0.8 and made some fixes around this issue. Please give it a try, and re-open this issue with any repro steps if you still see the problem.
@sakash279 - after upgrading oData from 7.6.4 to 7.9 I started getting this error again: Microsoft.Azure.Cosmos.Table.StorageException: Method 'Visit' in type 'QueryTokenVisitor' from assembly 'Microsoft.Azure.Cosmos.Table, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
This has not been fixed. I assume there must be a particular other dependency or similar we've got that's causing the problem, because this makes the project unusable and there aren't loads of people shouting about it.
Our code:
var cloudTable = GetTable();
var query = new TableQuery<T>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey));
return cloudTable.ExecuteQuery(query).ToList();
Which throws:
Error : Method 'Visit' in type 'QueryTokenVisitor' from assembly 'Microsoft.Azure.Cosmos.Table, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation. Trace: at Microsoft.Azure.Cosmos.Table.Extensions.TableExtensionExecutor.<>cDisplayClass24_0
2.<<ExecuteQuerySegmentedInternalAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Azure.Cosmos.Table.Extensions.TableExtensionRetryPolicy.<ExecuteUnderRetryPolicy>d__2
1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Cosmos.Table.Extensions.TableExtensionExecutor.ExecuteQuerySegmented[TResult,TInput](TableQuery1 query, TableContinuationToken token, CloudTableClient client, CloudTable table, EntityResolver
1 resolver, TableRequestOptions requestOptions, OperationContext operationContext) at Microsoft.Azure.Cosmos.Table.TableQuery1.ExecuteQuerySegmentedInternal(TableContinuationToken token, CloudTableClient client, CloudTable table, TableRequestOptions requestOptions, OperationContext operationContext) at Microsoft.Azure.Cosmos.Table.TableQuery
1.<>c__DisplayClass42_0.b 0(TableContinuationToken continuationToken) at Microsoft.Azure.Cosmos.Table.CommonUtility.d__2 1.MoveNext() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
I'll investigate further tomorrow.
See also https://github.com/OData/AspNetCoreOData/issues/263
@iant-ee - Yes, please update with your findings here. It must be a specific dependency in your projects that's causing this conflict I'd guess.
In addition, please consider evaluating this client library for your needs going forward. https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/tables/Azure.Data.Tables/README.md
It'll require a rewrite given interfaces have changed. This will be the future direction of the Tables SDK, and the code is also open sourced in github.
@sakash279 Thanks for your advice. We're not doing anything particularly complicated with Azure Tables, so I was able to migrate to Azure.Data.Tables. The migration took me about 2 - 3 hours, which is less than the time I've spent debugging the old version.
I don't see this error after the migration to Azure.Data.Tables.
SDK version: 1.0.6
Consistent issue Environment: Visual Studio 2019 - Windows 10 (x64) Stack Trace