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

Allow "summarize by" to work with dynamic type #61

Closed JiTmun closed 2 years ago

JiTmun commented 2 years ago

Hello,

Current Behavior of "summarize by"

Currently, using "summarize by " throw the following error: Summarize group key 'dynamic column' is of a 'dynamic' type. Please use an explicit cast (for example, 'summarize ... by tostring(process_path)') as grouping by a 'dynamic' type is not supported.

Enhancement proposition

Enhancement could be "summarize" casting by default to string any column specified after the "by" clause before proceeding to the aggregation. Usability will be greatly improved by removing useless tostring(mycol). I don't think this change will cause compatibility issues because of the current behavior raising an error, so that no query could be working currently if there isn't an explicit cast.

sloutsky commented 2 years ago

Please suggest features at https://aka.ms/adx.uservoice