alamb commented on PR #25887: URL: https://github.com/apache/datafusion/pull/25887#issuecomment-6350546837
> @alamb the most recent two commits change things so that the only remaining incompatible change is in the CLI where we'll need to decide what the default behaviour is. Should I revert that back to the current behaviour as well? yes I think we should revert the CLI behavior back I also tested again and found a few issues: ## EXPLAIN SHOW TABLES stopped working: On main: ```sql andrewlamb@Andrews-MacBook-Pro-3 ~ % datafusion-cli DataFusion CLI v55.1.0 > explain show tables; +---------------+-------------------------------+ | plan_type | plan | +---------------+-------------------------------+ | physical_plan | ┌───────────────────────────┐ | | | │ StreamingTableExec │ | | | │ -------------------- │ | | | │ limit: None │ | | | └───────────────────────────┘ | | | | +---------------+-------------------------------+ 1 row(s) fetched. Elapsed 0.004 seconds. ``` This PR: ```sql > EXPLAIN SHOW TABLES; Error during planning: SHOW TABLES is not supported unless information_schema is enabled > show datafusion.catalog.information_schema; +---------------------------------------+-------+ | name | value | +---------------------------------------+-------+ | datafusion.catalog.information_schema | true | +---------------------------------------+-------+ 1 row(s) fetched. Elapsed 0.012 seconds. ``` ## There are a bunch of new `NULL` views in information schema ```sql > -- set up two catalogs with a table each create catalog my_catalog; create schema my_catalog.my_schema; create table my_catalog.my_schema.t1 as values (1); create view v1 as select 1; -- a real view in datafusion.public, so a non-NULL definition shows up -- scoped to the default catalog (datafusion) select table_catalog, table_schema, table_name, definition from information_schema.views; ``` Main: ``` +---------------+--------------+------------+----------------------------+ | table_catalog | table_schema | table_name | definition | +---------------+--------------+------------+----------------------------+ | my_catalog | my_schema | t1 | NULL | | datafusion | public | v1 | CREATE VIEW v1 AS SELECT 1 | +---------------+--------------+------------+----------------------------+ ``` This PR ```sql +---------------+--------------------+-------------+----------------------------+ | table_catalog | table_schema | table_name | definition | +---------------+--------------------+-------------+----------------------------+ | datafusion | public | v1 | CREATE VIEW v1 AS SELECT 1 | | datafusion | information_schema | tables | NULL | | datafusion | information_schema | views | NULL | | datafusion | information_schema | columns | NULL | | datafusion | information_schema | df_settings | NULL | | datafusion | information_schema | schemata | NULL | | datafusion | information_schema | routines | NULL | | datafusion | information_schema | parameters | NULL | +---------------+--------------------+-------------+----------------------------+ 8 row(s) fetched. Elapsed 0.005 seconds. ``` ## Change (in a good way) Also, I think on main this sql query runs (weirdly as `no_such_catalog` does not exist) however, on this PR it errors (which seems better) ```sql -- Querying the information_schema of a catalog that does not exist -- main: returns the global listing (catalog name is ignored) -- PR #25887: Error during planning: table 'no_such_catalog.information_schema.tables' not found create catalog my_catalog; create schema my_catalog.my_schema; create table my_catalog.my_schema.t1 as values (1); select table_catalog, table_schema, table_name from no_such_catalog.information_schema.tables where table_schema <> 'information_schema'; ``` -- 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]
