kumarUjjawal commented on code in PR #22017:
URL: https://github.com/apache/datafusion/pull/22017#discussion_r3187794808
##########
datafusion/physical-plan/src/stream.rs:
##########
@@ -338,14 +343,18 @@ impl RecordBatchReceiverStreamBuilder {
// is no place to send the error and no reason to continue.
output.send(Err(e)).await.ok();
debug!(
- "Stopping execution: error executing input: {}",
- displayable(input.as_ref()).one_line()
+ "Stopping execution: error executing input:
{input_display}",
Review Comment:
The Err branch returns before reaching drop(input) at line 356, so input
only drops on scope end via the closure. Moving the drop into the Ok arm makes
the intent clearer and removes the misleading appearance that drop runs on both
paths.
##########
datafusion/physical-plan/src/stream.rs:
##########
@@ -330,6 +330,11 @@ impl RecordBatchReceiverStreamBuilder {
context: Arc<TaskContext>,
) {
let output = self.tx();
+ let input_display = if log::log_enabled!(log::Level::Debug) {
+ displayable(input.as_ref()).one_line().to_string()
+ } else {
+ "".to_owned()
Review Comment:
should we use String::new()?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]