-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix: percentile operator bug in limit queries #3205
Conversation
Please help me understand why templating is needed here |
If user uses |
I do not think templating should be used because we need to make more code changes. What more changes are we talking about? There is one |
Apart from filter |
This is very unlikely. I don't think that justifies it. Assume such a key exists for the sake of argument. Does this fix solve all the issues? This is simply checking specific limit cases. |
In cases where we are using limit, it won't be a reproducible but template doesn't fix other such possible cases. We can use template everywhere to avoid the issues. |
My point is that issue arose because of a special character, and it should be escaped. The idea of templatizing the whole query builder is a new effort from scratch; having seen the builder code, I think it will turn out to be a net negative and (most likely) will not fix the special character problems. I do not think we should introduce a templating here, and "mode code changes" is not a justifiable reason. I can think of many cases where not escaping is the source of bugs (try // @nityanandagohain @rkssisodiya @ankitnayan |
There must be many golang projects that deal with the same issue. It would be wise to look into a few of them and get inspiration. @makeavish please post your findings |
Other projects use DB library query parameters methods instead of manual escaping. We should also use clickhouse named parameters. We are already using clickhouse named parameters for |
Closing this as we will go ahead with using clickhouse named operators: #3345 |
close(#3204)