korowa commented on code in PR #5490:
URL: https://github.com/apache/arrow-datafusion/pull/5490#discussion_r1130636974


##########
datafusion/core/src/physical_plan/common.rs:
##########
@@ -39,8 +39,14 @@ use std::task::{Context, Poll};
 use tokio::sync::mpsc;
 use tokio::task::JoinHandle;
 
+/// [`MemoryReservation`] used across query execution streams
 pub(crate) type SharedMemoryReservation = Arc<Mutex<MemoryReservation>>;
 
+/// [`MemoryReservation`] used at query operator level
+/// `Option` wrapper allows to initialize empty reservation in operator 
constructor,
+/// and set it to actual reservation at stream level.
+pub(crate) type OperatorMemoryReservation = 
Arc<Mutex<Option<SharedMemoryReservation>>>;

Review Comment:
   So, if there are no objections, I'd prefer to figure out proper way to 
handle operator-level reservations as a separate follow-up PR, or one of 
remaining joins (at least NL will have the same issue 100%)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to