Re: GROUP BY ordinals with expand star

2024-05-29 Thread Julian Hyde
OK, please log a jira case. Please describe cases where it should give an error. Describe any pertinent flags. > On May 29, 2024, at 8:58 AM, Itiel Sadeh > wrote: > > Thanks for the response Julian. > > I agree that it is a pretty unuseful use case, but it is a valid SQL as far > as I can tel

Re: GROUP BY ordinals with expand star

2024-05-29 Thread Itiel Sadeh
Thanks for the response Julian. I agree that it is a pretty unuseful use case, but it is a valid SQL as far as I can tell. PostgreSQL does support it. Maybe Calcite shouldn't support it, but I think that the error message is a bit unintuitive in this case. Thanks again, Itiel On Tue, May 28, 202

Re: GROUP BY ordinals with expand star

2024-05-28 Thread Julian Hyde
It doesn’t seem particularly useful to use “*” in a “GROUP BY” query. The query will be invalid if you don’t include all the columns in the GROUP BY clause. (In a few databases, one of which is MySQL, the query “SELECT empno, deptno, sal FROM emp GROUP BY empno” would be valid if “empno” is a pr

GROUP BY ordinals with expand star

2024-05-28 Thread Itiel Sadeh
Hello calcite team, Consider the following: Let's say I have a table "t" with two columns: "CREATE TABLE t(x int, y int);" Now, the following query will result in validation error: "SELECT * FROM t GROUP BY 1,2", But if I'm not using "*" it will work: "SELECT x, y FROM t GROUP BY 1,2" The issue