From f5ba7fde9f6ffc39d5834dc303d841b396c0d5ea Mon Sep 17 00:00:00 2001 From: Austin Kothig Date: Thu, 8 Feb 2024 10:09:02 -0500 Subject: [PATCH] Only set dialect if KQL or PRQL. --- src/Client/HedgedConnections.cpp | 3 ++- src/Client/MultiplexedConnections.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Client/HedgedConnections.cpp b/src/Client/HedgedConnections.cpp index 5e08549e5be..0795a6740c3 100644 --- a/src/Client/HedgedConnections.cpp +++ b/src/Client/HedgedConnections.cpp @@ -178,7 +178,8 @@ void HedgedConnections::sendQuery( Settings modified_settings = settings; // Kusto and PRQL queries to replicas are transformed to ClickHouse-SQL. Ensure the setting before sending. - modified_settings.dialect = Dialect::clickhouse; + if (modified_settings.dialect == Dialect::kusto || modified_settings.dialect == Dialect::prql) + modified_settings.dialect = Dialect::clickhouse; if (disable_two_level_aggregation) { diff --git a/src/Client/MultiplexedConnections.cpp b/src/Client/MultiplexedConnections.cpp index 0ccb0c6ac55..100a635938d 100644 --- a/src/Client/MultiplexedConnections.cpp +++ b/src/Client/MultiplexedConnections.cpp @@ -127,7 +127,8 @@ void MultiplexedConnections::sendQuery( Settings modified_settings = settings; // Kusto and PRQL queries to replicas are transformed to ClickHouse-SQL. Ensure the setting before sending. - modified_settings.dialect = Dialect::clickhouse; + if (modified_settings.dialect == Dialect::kusto || modified_settings.dialect == Dialect::prql) + modified_settings.dialect = Dialect::clickhouse; for (auto & replica : replica_states) {