-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: PartitionedOutputNode must distinguish the root of a plan #15404
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
base: main
Are you sure you want to change the base?
Conversation
Currently when we translate a Presto plan to a Velox plan fragment, we do not have a way later on at the Velox layer to detect if a particular PartitionedOutputNode will be read by the coordinator as the final output of a plan or will be read by other workers. This patch adds a new field to PartitionedOutputNode so we can signal this during plan translation inside Prestissimo. In my particular case, This is needed to order to support exchange translation decisions in the cuDF exchange (coming in via a later PR), where the last PartitionedOutputNode has a single partition and will be read by the Presto coordinator, but all other PartitionedOutputNodes will be actually read by other workers via special, hardware accelerated Exchange. Without this change we have no way to distinguish these two at the pure Velox DriverAdapter translation level.
✅ Deploy Preview for meta-velox canceled.
|
| return outputType_; | ||
| } | ||
|
|
||
| const bool isRootFragment() const { |
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.
no need to use const since the return is a scalar value here.
bool isRootFragment() const {
Similar to below
bool isPartitioned() const {
|
@mbasmanova, @xiaoxmeng, any thoughts on this API change? |
|
On the Prestissimo side, the OutputNode is also mapped to the Velox PartitionedOutputNode. This field will help capture that information. |
mbasmanova
left a comment
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.
@zoltan It sounds like you want to introduce a new plan node: OutputNode. That node is a special case of PartitionedOutputNode: it must be the root node and must have "gather" semantic.
Currently when we translate a Presto plan to a Velox plan fragment, we do not have a way later on at the Velox layer to detect if a particular PartitionedOutputNode will be read by the coordinator as the final output of a plan or will be read by other workers.
This patch adds a new field to PartitionedOutputNode so we can signal this during plan translation inside Prestissimo.
In my particular case, This is needed to order to support exchange translation decisions in the cuDF exchange (coming in via a later PR), where the last PartitionedOutputNode has a single partition and will be read by the Presto coordinator, but all other PartitionedOutputNodes will be actually read by other workers via special, hardware accelerated Exchange. Without this change we have no way to distinguish these two at the pure Velox DriverAdapter translation level.