-
Notifications
You must be signed in to change notification settings - Fork 556
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
Clickhouse SQL generation for datatypes. #1482
base: main
Are you sure you want to change the base?
Clickhouse SQL generation for datatypes. #1482
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @grigoryan-sergey hmm with the current changes I expect a lot of tests to fail since we''ve also changed types that affect other dialects. I wonder if there's a way to support both styles 🤔 (I guess first would be if Clickhouse is the only supported dialect with a different behavior)
Hi @iffyio. What do you mean by both styles? Camel case as in Clickhouse and uppercase notations? Currently in the code both of this styles are kind of mixed. I agree with you, it would be best to support both styles. In this PR I suggested to change only those which affect Clickhouse SQL generation. |
Ah yeah by both styles I mean that, today when displaying sql, the parser always uses upper case e.g. I agree that it will be quite invasive to make this behavior configurable. On the other hand, I fear that using camel case for some types vs upper case for others will be quite haphazard (especially if Clickhouse isn't alone with this requirement). Currently I'm not sure what a good way to approach this issue is actually 🤔 |
@iffyio This looks like a job for the |
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
The SQL generated by the parser does not work inside Clickhouse. The problem is in datatypes, which are case sensitive in Clickhouse. I suggest generating a Clickhouse version for datatypes. This will still work for other databases where datatypes are not case sensitive (like postgres) and will also work for Clickhouse. Interesting enough some datatypes are also not case sensitive in Clickhouse, but the ones which are case sensitive, are converted in the PR.