Skip to content

Commit

Permalink
fix(interactive): Fix metadata getting for loading config (#3915)
Browse files Browse the repository at this point in the history
As titled.
  • Loading branch information
zhanglei1949 authored Jul 4, 2024
1 parent a99b5bb commit fad59b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flex/storages/rt_mutable_graph/loading_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down
2 changes: 2 additions & 0 deletions flex/storages/rt_mutable_graph/loading_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit fad59b6

Please sign in to comment.