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

Support join failure in Diagnotics: "Inconsistent data types for the join keys"? #84

Closed callmewhy closed 1 year ago

callmewhy commented 1 year ago

Hi, we noticed that the kind of error "Inconsistent data types for the join keys (TenantId, TenantId) (StringBuffer, UniqueId)" cannot be detected in kustoCode.GetDiagnotics()

Sample query

let a = datatable(id: string) [];
let b = datatable(id: guid) [];
a | join kind=inner b on id

In Kusto Client there is also no error detected, so I supposed it's not supported by static analytics yet.

But it should be able to be detected as it's a type mismatch and we have the context for projected columns. Do you consider supporting this feature?

Thanks

mattwar commented 1 year ago

Yes, I'll add this check to the static analysis.

mattwar commented 1 year ago

This has been added to the semantic analysis.

callmewhy commented 1 year ago

Hi @mattwar , thanks for the code change, I see the error in internal Kusto Client now. How can I take the latest code in NuGet? I saw the nuget Kusto.Language is still v11.0 published 2month ago. When will the new version be available? Thanks