Re: [DISCUSS] Support to group rows by column ordinals

2024-06-28 Thread Muhammet Orazov
Hey Jeyhun, - No, it wont disable the grouping/ordering by the column names. One "disadvantage" is that once the flag is enabled, "GROUP BY 1" will have a different meaning and query result. Ahh I see. Thanks for explaining, it was not obvious for me from the PR and discussions. Best, Muh

Re: [DISCUSS] Support to group rows by column ordinals

2024-06-21 Thread Sergey Nuyanzin
>I think so. But this is orthogonal to this issue [1] (deciding whether to >provide the proposed feature or not), no? thanks for your response yep, I looked into the issue however still not clear what problem is solved with this approach from my point of view the query there is good to highlight t

Re: [DISCUSS] Support to group rows by column ordinals

2024-06-21 Thread Jeyhun Karimov
Hi Sergey, Thanks for your comments. Could you please elaborate more on use cases of this feature? IMHO, the main use-cases can be - simplifying some SQL queries (e.g., with queries including many/long column names) - having consistency when refactoring (e.g., columns are renamed) - handling ca

Re: [DISCUSS] Support to group rows by column ordinals

2024-06-21 Thread Jeyhun Karimov
Hi Muhammet, Thanks for your comment. Personally, I find this feature confusing, it feels always natural to use > column names. - I also have the similar experience w.r.t. using column ordinals. But it seems counterintuitive to enable flag for this feature. Enabling it, should not disable grou

Re: [DISCUSS] Support to group rows by column ordinals

2024-06-20 Thread Sergey Nuyanzin
Hey Jeyhun, Thanks for starting the discussion. Could you please elaborate more on use cases of this feature? The one that I see in FLINK-34366[1] is to simplify referencing to aliases in SELECT from GROUP BY (also potentially ORDER BY and HAVING). I wonder whether there is some other use cases w

Re: [DISCUSS] Support to group rows by column ordinals

2024-06-20 Thread Muhammet Orazov
Hey Jeyhun, Thanks for bringing it up! +-1 from my side. Personally, I find this feature confusing, it feels always natural to use column names. SQL power users will ask for it, I have seen it used in automated complex queries also. But it seems counterintuitive to enable flag for this featur