-
Notifications
You must be signed in to change notification settings - Fork 158
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
Comet native shuffle in rust doesn't handle empty projection properly #102
Comments
I think this is Comet native shuffle, not columnar shuffle? |
I'm not that familiar with the rust shuffle part yet. So I may have misused columnar shuffle or native shuffle. When I'm referring the Columnar shuffle, I may be talking all the shuffle part in the rust code. It would be helpful if you can elaborate a bit the difference between Comet native shuffle and columnar shuffle. |
I think for native shuffle, the majority of shuffle write happens on the native side. The native On the other hand, for the columnar shuffle, the JVM side does the heavy duty work but only the writing of sorted shuffle files happen on the native side. In addition, several optimizations were made on the JVM side, including async shuffle mode (the sorting of shuffle data and writing sorted data to disk are de-coupled). Columnar shuffle supports both hash-based shuffle and sort-based shuffle, and also support all (I think?) partitioning types (hash/range/round-robin). In addition, columnar shuffle also support a non-native operator as input, unlike native shuffle whose previous operator must be a native Comet operator. The downside of columnar shuffle, I think, is that it has to do extra row-to-columnar conversion regardless of whether the input is columnar batch (from native Comet operator), or rows (e.g., from Spark operator). Therefore, performance may not be as good as native shuffle. However, I think it is relatively more robust and has better coverage. We are trying to move columnar shuffle as the default mode and prioritize this more for now. |
Thanks for detailed explanation, it helps a lot. I changed the issue title as well..
It seems there's still place to improve. Will native shuffle supports sort-based shuffle in your long-term roadmap? |
Yes definitely. We would shift our focus to native shuffle once we have a mature columnar shuffle implementation, which enables us to unlock more native executions. Currently there are still some issues with columnar shuffle. |
Describe the bug
When testing #100, I noticed that Comet's columnar shuffle doesn't handle empty projection correctly. The shuffle write
thread throws an exception as follows:
Steps to reproduce
In org.apache.comet.exec.CometExecSuite, modify the
empty projection
test case as following:Expected behavior
Test case could passed correctly.
Additional context
No response
The text was updated successfully, but these errors were encountered: