You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/11/02 20:13:48 UTC

Re: [I] Add support for GROUP BY Struct (Unsupported data type in hasher: Struct) [datafusion]

alamb commented on issue #1952:
URL: https://github.com/apache/datafusion/issues/1952#issuecomment-2453115478

   THanks to @drauschenbach  for flagging this. I double checked and it works now
   
   ```sql
   DataFusion CLI v42.1.0
   > create table t as values ({a: 1, b:2}), ({a:2, b:3}), ({a:1, b:2});
   0 row(s) fetched.
   Elapsed 0.048 seconds.
   
   > select * from t;
   +--------------+
   | column1      |
   +--------------+
   | {a: 1, b: 2} |
   | {a: 2, b: 3} |
   | {a: 1, b: 2} |
   +--------------+
   3 row(s) fetched.
   Elapsed 0.009 seconds.
   
   > select column1, count(*) from t group by column1;
   +--------------+----------+
   | column1      | count(*) |
   +--------------+----------+
   | {a: 1, b: 2} | 2        |
   | {a: 2, b: 3} | 1        |
   +--------------+----------+
   2 row(s) fetched.
   Elapsed 0.020 seconds.
   ```


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org