Skip to content

Commit c3fc4c6

Browse files
authored
Merge branch 'develop' into fix/read-match-case
2 parents ebf9ff3 + 6df6112 commit c3fc4c6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cpp/src/reader/table_query_executor.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@ int TableQueryExecutor::query(const std::string &table_name,
5050
column_mapping->add(std_column_names[i], static_cast<int>(i), *table_schema);
5151
}
5252
std::vector<common::TSDataType> data_types;
53-
data_types.reserve(std_column_names.size());
54-
for (size_t i = 0; i < std_column_names.size(); ++i) {
55-
auto ind = table_schema->find_column_index(std_column_names[i]);
53+
data_types.reserve(columns.size());
54+
for (size_t i = 0; i < columns.size(); ++i) {
55+
auto ind = table_schema->find_column_index(columns[i]);
56+
if (ind < 0) {
57+
return common::E_COLUMN_NOT_EXIST;
58+
}
5659
data_types.push_back(table_schema->get_data_types()[ind]);
5760
}
5861
// column_mapping.add(*measurement_filter);

0 commit comments

Comments
 (0)