zhang-arvin commented on PR #39540: URL: https://github.com/apache/shardingsphere/pull/39540#issuecomment-6051638558
Thanks for the thorough review. All four blocking issues are addressed and pushed at 72949224 (rebased onto current `master`). **1. Preserve schema identity.** The check now compares the full identity `storageUnit.schema.physicalTable`, not storage unit + table name. The expected schema comes from the material's `defaultSchemaName`, the loaded schema from `SchemaMetaData.getName()`. Your probe case is covered by a test: expecting `public.foo` while only `archive.foo` loads now emits `[dialect_success.public.foo]`. **2. Do not fold physical table names.** `normalizeForLookup` / `IdentifierCasePolicy` are gone from the comparison entirely; both sides are compared case-sensitively, so distinct physical tables `Foo` and `foo` stay distinct. Added a test where `Foo` and `foo` are expected and only `foo` loads, asserting the WARN reports `[dialect_success.foo_db.Foo]`. **3. Tests.** The substring assertions are replaced by exact-message assertions on the missing-identity set, so a batch that drops the first material or conflates identities can no longer pass. Added: cross-storage-unit (`foo_ds_1.foo_db.t_order`, `foo_ds_2.foo_db.t_order`), cross-schema (same name in another schema), case-sensitive physical names, a schema-aware match that must stay silent, and the dialect-fallback WARN now asserts the original `SQLException` is retained via the throwable proxy. **4. Manual coding rules.** The new method is now a single set difference over two flat `LinkedHashSet`s (expected vs loaded) built in one loop each — the per-storage-unit maps, nested loops, and the unreachable null/missing-key fallbacks are removed. `buildIdentity(storageUnit, schema, table)` is the only helper left. Verified locally (JDK 21+): - `MetaDataLoaderTest`: 15/15 pass. - Whole `database/connector/core` module: 305/305 pass. - `./mvnw -pl database/connector/core checkstyle:check spotless:check -Pcheck`: exit 0, 0 checkstyle violations. -- 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]
