Skip to content

Commit 844cb4b

Browse files
committed
Make clear that mutex is locked for very short amount of time
1 parent 178a349 commit 844cb4b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

datafusion/src/physical_plan/cross_join.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,10 @@ impl Stream for CrossJoinStream {
260260
) -> std::task::Poll<Option<Self::Item>> {
261261
if self.left_index > 0 && self.left_index < self.left_data.num_rows() {
262262
let start = Instant::now();
263-
let right_batch = self.right_batch.lock().unwrap().clone().unwrap();
263+
let right_batch = {
264+
let right_batch = self.right_batch.lock();
265+
right_batch.clone().unwrap()
266+
};
264267
let result =
265268
build_batch(self.left_index, &right_batch, &self.left_data, &self.schema);
266269
self.num_input_rows += right_batch.num_rows();

0 commit comments

Comments
 (0)