Describe the bug
When the final line of a Kusto query ends with a comment, the count query fails if the tabular expression result contains more than truncationmaxrecords rows (500000 by default).
Expected behavior
All else the same, I expected the query range _ from 1 to 500001 step 1 // this comment causes issue to behave identically to the query range _ from 1 to 500001 step 1 (when truncationmaxrecords is 500000 or below in this case).
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Describe the bug When the final line of a Kusto query ends with a comment, the count query fails if the tabular expression result contains more than
truncationmaxrecords
rows (500000 by default).To Reproduce
Expected behavior All else the same, I expected the query
range _ from 1 to 500001 step 1 // this comment causes issue
to behave identically to the queryrange _ from 1 to 500001 step 1
(whentruncationmaxrecords
is 500000 or below in this case).Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context Maybe it has something to do with this code: https://github.com/Azure/azure-kusto-spark/blob/83cf263a7e56365a52f895cf774fb24b72e9e0fc/connector/src/main/scala/com/microsoft/kusto/spark/utils/KustoQueryUtils.scala#L11-L13 Perhaps changing would solve the issue:
(I do not know Scala)