Skip to content

Commit 7a6723c

Browse files
committed
renmae option
1 parent b203fdd commit 7a6723c

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

flex/storages/rt_mutable_graph/loading_config.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ static bool parse_bulk_load_config_file(const std::string& config_file,
425425
load_config.metadata_[reader_options::DOUBLE_QUOTE] = "false";
426426
load_config.metadata_[reader_options::ESCAPE_CHAR] = "\\";
427427
load_config.metadata_[reader_options::ESCAPING] = "false";
428-
load_config.metadata_[reader_options::BLOCK_SIZE_KEY] =
428+
load_config.metadata_[reader_options::BATCH_SIZE_KEY] =
429429
std::to_string(reader_options::DEFAULT_BLOCK_SIZE);
430430
load_config.metadata_[reader_options::BATCH_READER] = "false";
431431
// put all key values in meta_data into metadata_
@@ -443,12 +443,12 @@ static bool parse_bulk_load_config_file(const std::string& config_file,
443443
<< " value: " << it->second.as<std::string>();
444444
if (reader_options::CSV_META_KEY_WORDS.find(key) !=
445445
reader_options::CSV_META_KEY_WORDS.end()) {
446-
if (key == reader_options::BLOCK_SIZE_KEY) {
446+
if (key == reader_options::BATCH_SIZE_KEY) {
447447
// special case for block size
448448
// parse block size (MB, b, KB, B) to bytes
449449
auto block_size_str = it->second.as<std::string>();
450450
auto block_size = parse_block_size(block_size_str);
451-
load_config.metadata_[reader_options::BLOCK_SIZE_KEY] =
451+
load_config.metadata_[reader_options::BATCH_SIZE_KEY] =
452452
std::to_string(block_size);
453453
} else {
454454
load_config.metadata_[key] = it->second.as<std::string>();
@@ -608,10 +608,10 @@ bool LoadingConfig::GetIsDoubleQuoting() const {
608608

609609
// get block size
610610
int32_t LoadingConfig::GetBlockSize() const {
611-
if (metadata_.find(reader_options::BLOCK_SIZE_KEY) == metadata_.end()) {
611+
if (metadata_.find(reader_options::BATCH_SIZE_KEY) == metadata_.end()) {
612612
return reader_options::DEFAULT_BLOCK_SIZE;
613613
}
614-
auto str = metadata_.at(reader_options::BLOCK_SIZE_KEY);
614+
auto str = metadata_.at(reader_options::BATCH_SIZE_KEY);
615615
return std::stoi(str);
616616
}
617617

flex/storages/rt_mutable_graph/loading_config.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,16 @@ static const char* ESCAPE_CHAR = "escape_char";
4545
static const char* QUOTING = "quoting";
4646
static const char* QUOTE_CHAR = "quote_char";
4747
static const char* DOUBLE_QUOTE = "double_quote";
48-
static const char* BLOCK_SIZE_KEY = "block_size";
48+
static const char* BATCH_SIZE_KEY = "batch_size";
4949
// whether or not to use record batch reader. If true, the reader will read
5050
// data in batches, otherwise, the reader will read data row by row.
5151
static const char* BATCH_READER = "batch_reader";
5252

5353
// static unordered_set
5454
static const std::unordered_set<std::string> CSV_META_KEY_WORDS = {
55-
DELIMITER, HEADER_ROW, INCLUDE_COLUMNS, COLUMN_TYPES, ESCAPING,
56-
ESCAPE_CHAR, QUOTING, QUOTE_CHAR, DOUBLE_QUOTE, BLOCK_SIZE_KEY,BATCH_READER};
55+
DELIMITER, HEADER_ROW, INCLUDE_COLUMNS, COLUMN_TYPES,
56+
ESCAPING, ESCAPE_CHAR, QUOTING, QUOTE_CHAR,
57+
DOUBLE_QUOTE, BATCH_SIZE_KEY, BATCH_READER};
5758

5859
} // namespace reader_options
5960

0 commit comments

Comments
 (0)