Closed BobdenOs closed 4 months ago
This is for customers which believe these queries will be faster for their use cases. As the other databases are very fast in rendering json. There is no reason to do this. Also the output result is unstable.
@BobdenOs How is the case handled, where a query has an where ID in <array>
clause. With new JSON concept only a single parameter was used and an json array was passed. Previously in old HANA adapter for each array entry a placeholder was used.
How is it now with your changes of this PR?
We liked the approach, that only a single placeholder is used because this would make the execution plan stable, no matter how many entries are in the array (which is often not under our control, as depending on user data)...
Having some toggles, that would provide different version would be good, so that we can experiment with that. For example also the Create was done with a single JSON object. How is this done now?
What do you think?
FYI @D069515
Adds
hana_simple_queries
feature flag. Which will make@cap-js/hana
run all possible queries withoutFOR JSON
. Which allowshdb
and@sap/hana-client
to returns different results again.Output converters are kept in place to reduce the likely hood of this happening. Current impacted test is
Bookshop - Order By › collations for aggregating queries with subselect
. Where the result ofsum(price) as pri
comes back as"150"
for@sap/hana-client
and"1.5e+2"
forhdb
. While expected is150
in theFOR JSON
result.Additionally this PR removes the duplicate
"_json_"
output definition. Simplifying the SQL in all cases.