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
MongoDB collection name case-sensitivity #1102
Comments
This can be fixed by finding the collection case-insensitively.
Fixing this requires #17 |
I am having this problem too.
@findepi any idea how to have a SELECT statement querying collection (table) name case-insensitively? I am having some db (schema) name in camelCase too. |
@tchunwei This requires code changes. I implemented case-insensitive name resolution in JDBC connectors (#614). |
Hi, @findepi I'm trying to implement the case-insensitive in mongo connector. |
@zgseed good question. Have at https://github.com/prestosql/presto/blob/9792498d4edefc3d47af03a7e627d048e2a91c30/presto-base-jdbc/src/main/java/io/prestosql/plugin/jdbc/ConnectionFactory.java#L25 In Mongo connector you don't need all of this. No need for "MongoIdentity" or the like. |
Be aware that there’s a change in progress to fix the underlying issue with case sensitive identifiers across the board: #1302 |
Thanks @martint for heads up. There are two use-cases:
Case-insensitive name resolution helps 2. but doesn't help 1. @zgseed if you have use-case 2. (and not 1.) and you need a stop-gap solution |
I have came across this stale PR prestodb/presto#6993, that is trying to implement case-insensitive name solution, which will help in case 2 that you mentioned. I tried to implement it over again by forking the latest source code, my implementation is here https://github.com/tchunwei/presto/tree/mongodb-case-insensitive . I am not really sure I am working in a correct way, but it does seems to work for me. I would be grateful if anyone can help to review this solution, and submit a PR if it is helpful for anybody else. |
@tchunwei you can just open a PR and let people provide feedback. |
MongoDB Collection is case sensitive: It is totally valid for one database to have two collections:
Hello
, andhello
, while Presto-MongoDB Connector use SchemaTableName to represent collection name, SchemaTableName itself is not case sensitive, it causes that we can not query mongodb collection which have uppercase letter in its name.The text was updated successfully, but these errors were encountered: