[release/8.0] Infer type mapping suitable for concatenating two results (#32510)#32520
[release/8.0] Infer type mapping suitable for concatenating two results (#32510)#32520wtgodbe merged 3 commits intorelease/8.0from
Conversation
|
Note that the branch is currently closed. |
|
Fix #32325 has resulted in regressions for Oracle EF Provider customers. Using the replication code given in bug,
which requires correction in OPENJSON subquery generation. After the fix is delivered in 8.0.2, the same test case generates the following query:
which got updated with the standard IN condition and skipped the creation of the OPENJSON subquery. This fix was not anticipated in the relational layer because the OPENJSON function is SQL Server provider-specific. As a result, the Oracle provider, which uses a standard IN condition in such cases and is dependent on inferring the right type and size by base class, experienced a regression. @ajcvickers @roji |
|
@indrajitjadeja the fix in #32510 only corrected the length on the type mapping; this is a general type mapping inference fix that isn't SQL Server-specific (even if the original bug manifested specifically in SQL Server). I'm still not clear on how it exactly it affects the Oracle SQL translation - can you please open a new issue with a clear minimal, runnable repro and the SQL generated in 8.0.1 and 8.0.2? |
Fixes #32325
Port of #32510
Description
When using OPENJSON for the new translation of Contains, if the items in the list are concatenated from items that have type facets, then the resultant type mapping might not be big enough to contain the entire value. This then may return incorrect results.
Customer impact
Queries which previously worked may now contain incorrect results.
How found
Customers reported on 8.0
Regression
Yes
Testing
Added
Risk
Low and quirked.