Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Mryange committed Mar 30, 2024
1 parent 37ea92d commit 9167b2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions be/src/pipeline/exec/scan_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ Status ScanLocalState<Derived>::open(RuntimeState* state) {
RETURN_IF_ERROR(_process_conjuncts());

auto status = _eos ? Status::OK() : _prepare_scanners();
RETURN_IF_ERROR(status);
if (_scanner_ctx) {
DCHECK(!_eos && _num_scanners->value() > 0);
RETURN_IF_ERROR(_scanner_ctx->init());
Expand Down Expand Up @@ -546,11 +547,15 @@ bool ScanLocalState<Derived>::_is_predicate_acting_on_slot(
template <typename Derived>
std::string ScanLocalState<Derived>::debug_string(int indentation_level) const {
fmt::memory_buffer debug_string_buffer;
fmt::format_to(debug_string_buffer, "{}, _eos = {}",
PipelineXLocalState<>::debug_string(indentation_level), _eos.load());
fmt::format_to(debug_string_buffer, "{}, _eos = {} , _opened = {}",
PipelineXLocalState<>::debug_string(indentation_level), _eos.load(),
_opened.load());
if (_scanner_ctx) {
fmt::format_to(debug_string_buffer, "");
fmt::format_to(debug_string_buffer, ", Scanner Context: {}", _scanner_ctx->debug_string());
} else {
fmt::format_to(debug_string_buffer, "");
fmt::format_to(debug_string_buffer, ", Scanner Context: NULL");
}

return fmt::to_string(debug_string_buffer);
Expand Down Expand Up @@ -1202,7 +1207,7 @@ Status ScanLocalState<Derived>::_prepare_scanners() {
}
if (scanners.empty()) {
_eos = true;
_scan_dependency->set_ready();
_scan_dependency->set_always_ready();
} else {
for (auto& scanner : scanners) {
scanner->set_query_statistics(_query_statistics.get());
Expand Down
2 changes: 1 addition & 1 deletion be/src/pipeline/exec/scan_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class ScanLocalState : public ScanLocalStateBase {
Status init(RuntimeState* state, LocalStateInfo& info) override;
Status open(RuntimeState* state) override;
Status close(RuntimeState* state) override;
std::string debug_string(int indentation_level) const override;
std::string debug_string(int indentation_level) const final;

bool ready_to_read() override;

Expand Down

0 comments on commit 9167b2c

Please sign in to comment.