codeant-ai-for-open-source[bot] commented on PR #40494:
URL: https://github.com/apache/superset/pull/40494#issuecomment-4562928449

   Question: 1. **catalog mismatch (critical)** — 
`get_table_by_schema_and_name` now takes `catalog` and the lookup uses the full 
`(database_id, catalog, schema, table_name)` uniqueness key. the api derives 
`catalog` from the request, falling back to `database.get_default_catalog()` to 
match the semantics in `datasetdao.validate_uniqueness`.
   
   2. **empty-string schema (major)** — request body's `schema` is now 
normalised with `body.get("schema") or none` so empty-string and missing schema 
resolve consistently against datasets stored with `null` schema.
   
   Answer:
   1. **Catalog mismatch:** Yes — the new lookup is using the same 4-part 
uniqueness key as the rest of the dataset logic, which is the right direction. 
In `get_or_create_dataset`, `catalog` is taken from the request when present, 
otherwise it falls back to `database.get_default_catalog()`, so it matches the 
semantics described in `DatasetDAO.validate_uniqueness`. That means the 
endpoint should no longer incorrectly match a dataset from a different catalog 
when the same `table_name` exists in multiple catalogs.
   
   2. **Empty-string schema:** Yes — `body.get("schema") or None` normalizes 
both missing schema and `""` to `None`, so the lookup is consistent with 
datasets stored with a `NULL` schema. That prevents a blank-string request 
value from failing to match an existing null-schema dataset, and it keeps the 
behavior aligned with how Superset generally treats empty schema values.
   
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to