Open ahsonkhan opened 2 hours ago
works as expected
There's a behavioral difference, and our SDKs need to be: 1) Idiomatic to the language. 2) Consistent across languages where (1) isn't lost.
That's written in our design guidelines: https://azure.github.io/azure-sdk/cpp_introduction.html#cpp-principles
Client libraries should be consistent within the language, consistent with the service and consistent between all target languages. In cases of conflict, consistency within the language is the highest priority and consistency between all target languages is the lowest priority.
1) The default value of
UpsertEntityOptions
isUpsertKind::Update
in C++, but it is Merge in other languages. 2) We are calling AddEntity in the exception path for some reason, which the other language SDKs don't do. Why do we do this?C++ implementation: https://github.com/Azure/azure-sdk-for-cpp/blob/384552adff3d6cdea46cdf8a345120b183bdcc1e/sdk/tables/azure-data-tables/src/table_clients.cpp#L599-L627
P.S. The
(void)options
line should be removed (on line 604), since the options are being used here..NET implementation: https://github.com/Azure/azure-sdk-for-net/blob/4e1173308d32f0413788359a87376e673f2ab15b/sdk/tables/Azure.Data.Tables/src/TableClient.cs#L818-L856
GoLang implementation: https://github.com/Azure/azure-sdk-for-go/blob/3ebd0d439f9d8aa06a0764a60892a8001b997a34/sdk/data/aztables/client.go#L420-L478
cc @jhendrixMSFT, @christothes