-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 failed when MongoDB has a dollar sign as their field name #3379
Comments
I can create a pull request if it's ok to just bypass field which starts with a dollar sign.
|
Thanks for your investigation. Did you try quoting the field in |
I hadn't tried quoting the field in the _schema collection. I will try it, thanks for the advise. |
I tired quoting the field in the _schema, I can get the metadata of the table ( The quoted field is de-quoted after
BTW, it looks like Mongo server supports the dollar sign (since 3.6.0), but the drivers are still not supported now. see SERVER-30575. (So I can't create a minimum reproducible unit test as java driver is not supported). |
I can select the table as below. Could you share the latest presto> select * from mongodb.tpch.test2;
c1
----------------------------
{x=1, field1={.y=1, $z=1}} |
It looks like it's working now, maybe I'm doing something wrong. I will check if I can create a unit test for this issue and create a pull request. Thanks! |
According to Document - Field Names
It's valid to have dollar signs in their field name.
For a given document:
Presto generate schema
And presto throw exception as dollar sign is not a valid character for field name.
The text was updated successfully, but these errors were encountered: