[release/7.0] Use default schema for TPC tables (#30214) #30241
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Port of #30214
Fixes #29899
Description
With TPC mapping, it is common for to have derived types that are mapped to tables while the base type is not mapped to a table. In these cases, the default schema was not being picked up for the derived types.
Customer impact
Customer reported in relatively common scenario. There is a workaround to manually specify the schema on all tables, but this can get tricky, especially when the schema is obtained from the tenant in multi-tenant scenarios.
How found
Customer reported on 7.0.
Regression
No; new feature in 7.0.
Testing
Default schema set for more existing tests to give better coverage.
Risk
Low; trivial code change to get the default schema in cases like this, and quirked.