microsoft / Kusto-Query-Language

Kusto Query Language is a simple and productive language for querying Big Data.
Apache License 2.0
510 stars 97 forks source link

`bin` function returns wrong type #67

Closed davidnx closed 2 years ago

davidnx commented 2 years ago

It seems like the bin function declaration is incorrect since it declares ReturnTypeKind.Parameter0 and this doesn't match actual Kusto behavior.

Trivial example:

print v = bin(10, 1.5)

Kusto.Language analysis of this query claims the result type is (v:long), but real Kusto produces (v:real).

Same issue, slightly more complex example

In this case, the implications are more significant:

print v=bin(5, 0.8)
| union (print v=1234.5)

Kusto.Language analysis of this query claims the result type is (v_long: long, v_real: real), but real Kusto produces (v:real).

More info

Tested with Microsoft.Azure.Kusto.Language version 10.0.1. Used App Insights to verify Kusto behavior in case this is relevant.

mattwar commented 2 years ago

This one has also been fixed.