From f25fb3c5d7787b67592e3a98fa0ddbdce7027a94 Mon Sep 17 00:00:00 2001 From: Monica Gupta Date: Sat, 12 Sep 2020 00:10:48 -0700 Subject: [PATCH] Kusto control command with comments or spaces (#1074) Co-authored-by: Monica Gupta --- src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs b/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs index ff6fea2c..8d7b6e73 100644 --- a/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs +++ b/src/Microsoft.Kusto.ServiceLayer/DataSource/KustoDataSource.cs @@ -229,6 +229,9 @@ namespace Microsoft.Kusto.ServiceLayer.DataSource cancellationToken.Register(() => CancelQuery(clientRequestProperties.ClientRequestId)); } + var kustoCodeService = new KustoCodeService(query); + query = kustoCodeService.GetMinimalText(MinimalTextKind.RemoveLeadingWhitespaceAndComments); + IDataReader origReader = KustoQueryProvider.ExecuteQuery( KustoQueryUtils.IsClusterLevelQuery(query) ? "" : databaseName, query,