sha174n opened a new pull request, #42717: URL: https://github.com/apache/superset/pull/42717
`is_cte()` compared only the final name component of a table reference, so a schema- or catalog-qualified reference whose last component matched a CTE defined in the same scope (e.g. `WITH orders AS (...) SELECT * FROM public.orders`) was misclassified as the CTE and dropped from `extract_tables_from_statement()`. A CTE name is always a bare identifier and can never carry a schema or catalog qualifier, so a qualified reference always resolves to a physical table. This treats any qualified reference as a real table. Bare references that match a CTE keep their existing behavior. Adds regression coverage for the qualified-reference, bare-CTE, and unreferenced-CTE cases. -- 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]
