From fad59b659da60762f0a4d059a18ebdcf8135afc4 Mon Sep 17 00:00:00 2001 From: Zhang Lei Date: Thu, 4 Jul 2024 17:01:27 +0800 Subject: [PATCH] fix(interactive): Fix metadata getting for loading config (#3915) As titled. --- flex/storages/rt_mutable_graph/loading_config.cc | 3 +++ flex/storages/rt_mutable_graph/loading_config.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/flex/storages/rt_mutable_graph/loading_config.cc b/flex/storages/rt_mutable_graph/loading_config.cc index 7817637873cf..3ef8aa93817c 100644 --- a/flex/storages/rt_mutable_graph/loading_config.cc +++ b/flex/storages/rt_mutable_graph/loading_config.cc @@ -835,6 +835,9 @@ int32_t LoadingConfig::GetBatchSize() const { } bool LoadingConfig::GetIsBatchReader() const { + if (metadata_.find(reader_options::BATCH_READER) == metadata_.end()) { + return reader_options::DEFAULT_BATCH_READER; + } auto str = metadata_.at(reader_options::BATCH_READER); return str == "true" || str == "True" || str == "TRUE"; } diff --git a/flex/storages/rt_mutable_graph/loading_config.h b/flex/storages/rt_mutable_graph/loading_config.h index 04c3754838e9..39135d003771 100644 --- a/flex/storages/rt_mutable_graph/loading_config.h +++ b/flex/storages/rt_mutable_graph/loading_config.h @@ -36,6 +36,8 @@ namespace gs { namespace reader_options { static const int32_t DEFAULT_BLOCK_SIZE = (1 << 20); // 1MB +static const bool DEFAULT_BATCH_READER = + false; // By default, we read the whole table at once. // KEY_WORDS for configurations static const char* DELIMITER = "delimiter";