ClaireLytt commented on PR #39786:
URL: https://github.com/apache/shardingsphere/pull/39786#issuecomment-5679659074
@terrymanu
Hi, thanks for your review!
Issue 1:
LinkedServerTableMapperRuleAttribute#getEnhancedTableNames() now returns
Collections.emptySet() instead of the mapped logical table names.
please see:
* LinkedServerTableMapperRuleAttribute.java-getEnhancedTableNames()
* Test: LinkedServerRuleTest.assertEnhancedTableNamesEmpty()
Issue2:
The LinkedServerConfiguration constructor now validates that every table key
contains at least two dot separators, enforcing the three-part
catalog.schema.table format required by the #39313 design contract. The
previous key.contains(".") check only rejected bare names like Department but
silently accepted two-part names like dbo.Department, which omit the catalog
segment and would cause lookup misses at runtime.
Three tests cover this:
- assertBareTableNameRejected — "Department" (zero dots) throws
IllegalArgumentException
- assertTwoPartTableNameRejected — "dbo.Department" (one dot) throws
IllegalArgumentException
- assertDistinctCatalogSchemaWithSameTableName — confirms
"HumanResources.dbo.Department" and "Sales.dbo.Department" resolve to different
logical tables without collision
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]