Search code examples
c#.netazureencodingazure-storage

Azure storage query does not return data if partition key contains an exclamation mark


I stored some data where the partition key contains an exclamation mark and when I do a query on that partition key I get weird results.

I have tried the following. Lets say the partitionkey is t!est

I have tried the following queries with their respectful results

PartitionKey eq 't!est' = Noting returned
PartitionKey gt 't!est' = Noting returned
PartitionKey ge 't!est' = Noting returned
PartitionKey lt 't!est' = Record returned (Along side others)
PartitionKey le 't!est' = Record returned (Along side others)

I would have expected that the equals would have at least retrieved my record. Is there something I am not understanding?

Tested with:

  • SDK .Net Version 7.2.1
  • SDK .Net Version 9.3.3
  • Microsoft Azure Storage Explorer Version 1.8.1

Solution

  • As stated by GauravMantri in his comment. This is an issue with the sdk where it is converting the '!' to a 'not', hence query will not match.