Github user yhuai commented on the pull request:
https://github.com/apache/spark/pull/5604#issuecomment-98219983
I have pushed my updated version. For now, I am still using Hive's UDAF. It
is mainly because we will do some major refactoring of our internal UDAF in
near future (#5542). So, I think it is better to switch to our functions after
that refactoring.
@hbutani I believe that I have addressed your comments on the window frame
boundary. Regarding the in memory buffer, right now, a physical operator
(`Window` in `execution` package) only holds a single partition. We can first
optimize it to only hold a buffer of [min(current row, start of frame),
max(current row, end of frame)] (in another pr). Then, we can start to exploit
optimization opportunities by considering the function properties.
@hvanhovell Your comments are very good! As mentioned in my reply to
Harish, I feel it will be good to use our functions instead Hive's after the
refactoring of UDAFs. Regarding "Use of SPARK 1.4 child ordering requirements",
this is exactly the way the current version works :) We will take advantage
`EnsureRequirements` to help us organize input rows. The current version
handles a single window spec at a time (ask you mentioned in your comments).
If multiple functions are using the same spec, we will evaluate them in the
same operator. Regarding buffering, please see my reply to Harish. Basically, I
am buffering a single partition at a time (instead of buffering all partitions
sent to a task). With current implementation, it will be easy to only buffer
[min(current row, start of frame), max(current row, end of frame)].
@scwf Once your #5776 is in, I will update it.
@guowei2 Can you remove WIP from the title?
I will start to cleanup my code and add more comments to explain how it
works.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]