Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

information_schema.columns table should have column info from views #3109

Closed
jennifersp opened this issue Mar 28, 2022 · 1 comment
Closed
Assignees
Labels
integrations Issues with tools connecting to/querying Dolt

Comments

@jennifersp
Copy link
Contributor

the columns from mytable should be in information_schema.columns table but references to table_name = 'myview'

CREATE TABLE mytable (pk bigint, v1 bigint);
CREATE VIEW myview AS SELECT * from mytable;
SELECT ordinal_position as ordinal_position,column_name as column_name,data_type AS data_type,is_nullable as is_nullable,column_type as column_type FROM information_schema.columns WHERE table_schema='tempdb'AND table_name='myview';

+------------------+-------------+-----------+-------------+-------------+
| ordinal_position | column_name | data_type | is_nullable | column_type |
+------------------+-------------+-----------+-------------+-------------+
|                1 | pk          | bigint    | NO          | bigint      |
|                2 | v1          | bigint    | NO          | bigint      |
+------------------+-------------+-----------+-------------+-------------+

above is result from Mysql. Dolt returns empty result, so that the view structure is empty in TablePlus

@jennifersp jennifersp added the integrations Issues with tools connecting to/querying Dolt label Mar 28, 2022
@jycor jycor self-assigned this Mar 30, 2022
@jycor
Copy link
Contributor

jycor commented Mar 31, 2022

VIEW structure is no longer empty, so they should show up. However, we are returning either NULL or empty string for many of the columns that are typically there for information_schema.columns. I think it would take a lot of changes to ViewDefinition in GMS to have this work correctly though.

@jycor jycor closed this as completed Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrations Issues with tools connecting to/querying Dolt
Projects
None yet
Development

No branches or pull requests

2 participants