You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jonahgao (via GitHub)" <gi...@apache.org> on 2024/02/08 08:02:45 UTC

[I] Probably incorrect result when the column referenced in GROUP BY is ambiguous [arrow-datafusion]

jonahgao opened a new issue, #9162:
URL: https://github.com/apache/arrow-datafusion/issues/9162

   ### Describe the bug
   
   The result might be incorrect when the column referenced in the GROUP BY clause is ambiguous; that is, when the column exists in both the select list and the input. This behavior is different from PostgreSQL.
   
   ### To Reproduce
   
   Run the following queries in DataFusion CLI .
   ```sh
   DataFusion CLI v35.0.0
   ❯ create table t(a bigint);
   0 rows in set. Query took 0.009 seconds.
   
   ❯ insert into t values(1),(2),(3);
   +-------+
   | count |
   +-------+
   | 3     |
   +-------+
   1 row in set. Query took 0.007 seconds.
   
   ❯ select 0 as "t.a" from t group by t.a;
   +-----+
   | t.a |
   +-----+
   | 0   |
   +-----+
   ```
   
   
   ### Expected behavior
   
   The result should ideally be the same as PostgreSQL, MySQL, and DuckDB.
   ```
   psql => select 0 as "t.a" from t group by t.a;
    t.a
   -----
      0
      0
      0
   (3 rows)
   ```
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Probably incorrect result when the column referenced in GROUP BY is ambiguous [arrow-datafusion]

Posted by "jonahgao (via GitHub)" <gi...@apache.org>.
jonahgao commented on issue #9162:
URL: https://github.com/apache/arrow-datafusion/issues/9162#issuecomment-1933542984

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Probably incorrect result when the column referenced in GROUP BY is ambiguous [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #9162:
URL: https://github.com/apache/arrow-datafusion/issues/9162#issuecomment-1934114019

   I agree matching the other behavior would be good


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Probably incorrect result when the column referenced in GROUP BY is ambiguous [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #9162: Probably incorrect result when the column referenced in GROUP BY is ambiguous
URL: https://github.com/apache/arrow-datafusion/issues/9162


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org