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

Presto is not able to read table in MySql with NAME as CAPITAL or having _. #14930

Open
isonusingh opened this issue Jul 30, 2020 · 10 comments
Open

Comments

@isonusingh
Copy link

I am also facing the same issue.
Database - RETAIL5M
Tables - ITEM, SALES, STORE, ONLINE_SALES, SALES_TEST.

Presto is not able to read this metadata, Please help.
image
image

@mbasmanova
Copy link
Contributor

This is a known limitation in Presto. The only workaround I know of is to rename the table to use lower case.

@mbasmanova
Copy link
Contributor

Here is an earlier discussion: #10288

@isonusingh
Copy link
Author

Thanks, Maria. Can we start fixing this?

@mbasmanova
Copy link
Contributor

@SonuSingh200190 Are you proposing to come up with a design that would address this issue and work on executing it?

@isonusingh
Copy link
Author

@mbasmanova yes I think we can fix this.

@mbasmanova
Copy link
Contributor

@mbasmanova yes I think we can fix this.

Please, go ahead. Looking forward to a design proposal and/or prototype.

@agrawalreetika
Copy link
Member

agrawalreetika commented Sep 5, 2020

I tried with presto latest version. It seems to be working fine.
This is how I have tables in my mysql instance-
image

Here is table list from presto cli-
image

Please correct me if I missing something here?

@marcejohnson
Copy link

@agrawalreetika what do you get when you type
show tables from mysql.presto.item_test;
?
For me, that is where it will fail on the case conversion and returns "does not exist".
Should be same failure with a select * from mysql.presto.item_test; in your example above.

@agrawalreetika
Copy link
Member

@marcejohnson item_test is itself a table in schema presto(In mysql) .
I tried SELECT operation on the table from presto-cli:
image

@marcejohnson
Copy link

marcejohnson commented Dec 14, 2020

@agrawaldevesh what output do you get when you type in mysql (not presto) client:
show variables like 'lower_case_%';

If latter returns non-zero for lower_case_table_names then mysql itself is doing case-insensitive compares, and explains why it works for you. My mysql server setting returns 0, which is a case sensitive compare, hence does not work well with presto (which strips the case).

https://mariadb.com/products/skysql/docs/reference/es/system-variables/lower_case_table_names/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants