Malformed OData Request
Closed this issue · 2 comments
Getting "Bad Request" when using the following LINQ query:
from t in TestTable
where t.PartitionKey == "Date Test" && t.TestDate < t.Timestamp
select t
Resulting query is: (PartitionKey eq 'Date Test') and (() lt ())
While the LINQ query is valid, OData only supports a subset of criteria and therefore cannot be translated.
Could an exception should be raised in those instances?
From what I understand, Table storage doesn't support comparing table columns among them, only against expressions that can be converted to constants in the OData query.
An exception is actually being thrown; StorageException
😛
The translation of Linq code into an OData query is done by the Azure SDK, so I don't control much of that process. I used to at least be able to show the URL in the SQL tab of LinqPad, but since I updated to a newer version of the SDK I can't even do that any more.
What do you suggest would be more appropriate behaviour?
I am getting StorageException
in LINQPad, but I thought that it might be possible to validate the query string before making the request. If the translation is done within Azure SDK then not much can be done about that. Thanks for your response.