Azure / Azure/Azurite

Azurite doesn't support query entities with binary on Storage Table

Open
#725 2 comments 0 reactions 0 assignees View on GitHub
enhancement stale
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

**Error Description:**
In Azure, It will query entities with binary successfully on storage table.
But in Azurite, it will return error "InvalidInput" in this case.
Azurite error is shown as following:
![Screenshot 2021-03-22 143628](https://user-images.githubusercontent.com/20970631/111955243-3a696000-8b24-11eb-9671-2dc9b16e5843.jpg)

**To Reproduce**
The demo code is shown as following:
```
import { odata, TableClient, TableEntity, TablesSharedKeyCredential } from "@azure/data-tables"

async function main() {
type BinaryEntity = { binary: Uint8Array };
const entitys: TableEntity[] = [{
partitionKey: "somPartition",
rowKey: "0001",
binary: new Uint8Array([1, 2, 2])
},
{
partitionKey: "somPartition",
rowKey: "0002",
binary: new Uint8Array([1, 2, 3])
}];

const credential = new TablesSharedKeyCredential("", "");
const client = new TableClient("", "", credential);
await client.create();
for (var entity of entitys) {
await client.createEntity(entity);
}
const listResults = client.listEntities({ queryOptions: { filter: odata`binary eq X'010203'` } });
for await (const result of listResults) {
console.log(result.rowKey);
}
await client.delete();
}

main().catch((err) => {
console.log(err);
});
```

**Error Track:**
In Azurite, binary filter is not supported yet when query entities. Process code is shown as following:
[https://github.com/Azure/Azurite/blob/table/src/table/persistence/LokiTableMetadataStore.ts#L743](https://github.com/Azure/Azurite/blob/table/src/table/persistence/LokiTableMetadataStore.ts#L743)
![image](https://user-images.githubusercontent.com/20970631/112080498-127a0b00-8bbd-11eb-8501-8a5db4012583.png)

**Expected Behavior:**
In Azurite, It can query entities with binary successfully on storage table.

@jongio for notification.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.