Skip to content

Commit

Permalink
bugfix: properly quote CH table name for SELECT queries. (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-min authored Mar 22, 2024
1 parent e05f8ea commit ff1bc11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ClickHouse/Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ String constructSelectQuery(const String & database, const String & table, const
auto query = "SELECT " + backQuoteIfNeed(col_names[0]);
for (const auto & name : std::vector<String>(std::next(col_names.begin()), col_names.end()))
query.append(", " + backQuoteIfNeed(name));
query.append(" FROM " + (database.empty() ? "" : backQuoteIfNeed(database) + ".") + table);
query.append(" FROM " + (database.empty() ? "" : backQuoteIfNeed(database) + ".") + backQuoteIfNeed(table));

return query;
}
Expand Down

0 comments on commit ff1bc11

Please sign in to comment.