-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add a UDF to extract the window start time from the message key #1674
Comments
Hey, I'm new to contributing. Can I try adding this? |
@zlex7 go for it! |
yes. thanks @zlex7 . I am assigning this to you. |
Actually, I can't assign it to you for some reason. In any case, feel free to take a stab at it. You can follow the example from here to add a new UDF: https://github.com/confluentinc/ksql/pull/1611/files |
Thanks for taking a stab at this, @zlex7 ! |
would be good to include |
Thinking aloud, maybe a udf is not the best solution for this - how about we instead provide an additional pseudo-column that's automatically created on the output table, say WINDOWTIME, just like we do for the message key and timestamp already. I wonder if this would feel more natural? |
I would recommend to return |
@blueedgenick IMO a UDF would be a useful stop-gap solution for something that has in effect caused a regression in functionality. I think the discussion around UDF vs system column did take place, and TBH so long as we get it built sooner than later either would be fine :) |
@big-andy-coates said he would take this on. |
Yep, I'm working on this... it's more involved than it might look. |
We should add a
WINDOWSTARTTIME()
UDF which returns the start time of the window if the underlying topic is windowed, or else return some sentinel value (like LONG_MAX) if it isn't.Getting access to the window start time is generally useful, and we can't depend on
ROWTIME
for this piece of information. See #1497The text was updated successfully, but these errors were encountered: