-
Notifications
You must be signed in to change notification settings - Fork 475
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
Support named windows in OVER (window_definition)
clause
#1166
Conversation
Actually disallow any keyword as `window_name` — seems like databases do the same
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.
Thank you for the contribution @Nikita-str -- this makes sense to me
tests/sqlparser_common.rs
Outdated
@@ -4115,6 +4117,62 @@ fn parse_window_functions() { | |||
}), | |||
expr_from_projection(&select.projection[0]) | |||
); | |||
|
|||
for i in 0..7 { |
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.
👍
@alamb first of all, should I do something with |
I think we may need to update the default limit to have a lower limit (it is right on the edge of stack limit in the debug build, and so any change to the stack size leads to a failure) Maybe we can do it in a separate PR -- any chance you are willing to do so? If not I will try to do so but it may be several days |
@alamb do you suggest to change Maybe it's better to wrap this test code into new thread with bigger stack size and then wait until the thread finished?: const KB: usize = 1024;
const MB: usize = 1024 * KB;
std::thread::Builder::new().stack_size(8 * MB).spawn(move || {
// prev code
}).unwrap().join().unwrap(); |
Yes, this is basically my suggestion The rationale is that doing so will prevent stack overflows / panics for debug builds. Another thing we can do is to see if we can reduce the stack frame size for some of the intermediate function calls (reduce stack frame means make fewer local variables) |
Ok, I will do it, Idea with wrapping is bad because it only handles the tests situation and when |
You are not the first to hit this problem -- I think @universalmind303 saw it in #1144 Thus i think we need to do some real work -- I will try and find time later this week to help |
Pull Request Test Coverage Report for Build 8588647268Details
💛 - Coveralls |
I merged up from main and now this test is passing 🎉 |
OVER (window_definition)
clauseOVER (window_definition)
clause
Thanks again @Nikita-str -- this is a very nice contribution |
…-rs#1166) Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Issue #999
Parse
window_name
inOVER ([window_name] [PARTITION BY ..] [ORDER BY ..] ..)