You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/28 20:55:06 UTC
[GitHub] [arrow-datafusion] tustvold opened a new issue, #4408: Information Schema Shows Tables from Other Catalogs
tustvold opened a new issue, #4408:
URL: https://github.com/apache/arrow-datafusion/issues/4408
**Describe the bug**
Currently `information_schema` shows the tables from all catalogs, effectively breaking catalog-level isolation.
**To Reproduce**
Using the datafusion-cli
```
❯ create database foo;
0 rows in set. Query took 0.000 seconds.
❯ select * from information_schema.tables;
+---------------+--------------------+-------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------------+-------------+------------+
| foo | information_schema | tables | VIEW |
| foo | information_schema | views | VIEW |
| foo | information_schema | columns | VIEW |
| foo | information_schema | df_settings | VIEW |
| datafusion | information_schema | tables | VIEW |
| datafusion | information_schema | views | VIEW |
| datafusion | information_schema | columns | VIEW |
| datafusion | information_schema | df_settings | VIEW |
+---------------+--------------------+-------------+------------+
```
**Expected behavior**
❯ create database foo;
0 rows in set. Query took 0.000 seconds.
❯ select * from information_schema.tables;
+---------------+--------------------+-------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------------+-------------+------------+
| datafusion | information_schema | tables | VIEW |
| datafusion | information_schema | views | VIEW |
| datafusion | information_schema | columns | VIEW |
| datafusion | information_schema | df_settings | VIEW |
+---------------+--------------------+-------------+------------+
```
This is consistent with postgres
```
postgres=# select distinct table_catalog from information_schema.tables;
table_catalog
---------------
postgres
(1 row)
postgres=# create database foo;
CREATE DATABASE
postgres=# select distinct table_catalog from information_schema.tables;
table_catalog
---------------
postgres
(1 row)
postgres=# \c foo
You are now connected to database "foo" as user "postgres".
foo=# select distinct table_catalog from information_schema.tables;
table_catalog
---------------
foo
(1 row)
```
It is also consistent with mysql
```
mysql> select distinct table_catalog from information_schema.tables;
+---------------+
| TABLE_CATALOG |
+---------------+
| def |
+---------------+
1 row in set (0.00 sec)
mysql> create database foo;
Query OK, 1 row affected (0.01 sec)
mysql> select distinct table_catalog from information_schema.tables;
+---------------+
| TABLE_CATALOG |
+---------------+
| def |
+---------------+
1 row in set (0.00 sec)
mysql> use foo;
Database changed
mysql> select distinct table_catalog from information_schema.tables;
+---------------+
| TABLE_CATALOG |
+---------------+
| def |
+---------------+
1 row in set (0.01 sec)
```
**Additional context**
I was looking into this as part of #3777, and information_schema kept cropping up as a sticking point for asyncification.
--
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: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Information Schema Shows Tables from Other Catalogs [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #4408:
URL: https://github.com/apache/datafusion/issues/4408#issuecomment-2453116063
Thanks again to @drauschenbach for highlighting this
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Information Schema Shows Tables from Other Catalogs [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #4408:
URL: https://github.com/apache/arrow-datafusion/issues/4408#issuecomment-1901151417
I think this was fixed a long time ago
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Information Schema Shows Tables from Other Catalogs [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #4408: Information Schema Shows Tables from Other Catalogs
URL: https://github.com/apache/datafusion/issues/4408
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org