From fd92d7fecb67dfdf2b55d7f44c51cbed95ddab20 Mon Sep 17 00:00:00 2001 From: binwei Date: Wed, 3 Jul 2024 16:48:26 +0000 Subject: [PATCH] debug window --- velox/exec/Window.cpp | 5 +++++ velox/exec/Window.h | 1 + 2 files changed, 6 insertions(+) diff --git a/velox/exec/Window.cpp b/velox/exec/Window.cpp index 5553f36e2f0f..896d66de7934 100644 --- a/velox/exec/Window.cpp +++ b/velox/exec/Window.cpp @@ -718,6 +718,11 @@ RowVectorPtr Window::getOutput() { currentPartition_->clearOutputRows(numResultRows.second); } } + numBatches_++; + if (numBatches_ % 10 == 0 ) + { + std::cout << this->pool()->root()->treeMemoryUsage() << std::endl; + } return numResultRows.first < numOutputRows ? std::dynamic_pointer_cast( diff --git a/velox/exec/Window.h b/velox/exec/Window.h index dbab02087815..439c44dc6e2f 100644 --- a/velox/exec/Window.h +++ b/velox/exec/Window.h @@ -231,6 +231,7 @@ class Window : public Operator { // computePeerBuffers they are saved here. vector_size_t peerStartRow_ = 0; vector_size_t peerEndRow_ = 0; + uint64_t numBatches_ = 0; }; } // namespace facebook::velox::exec