HiveServer2Error: Error while compiling statement: FAILED: SemanticException [Error 10025]: Line 1:7 Expression not in GROUP BY key 'day'
See original GitHub issueI created a table and when I sql query everything works fine. but when I use ibis, it gives the error above.
hive_cursor.execute('CREATE TABLE default.demo_table_ibis4 (day STRING, sales INTEGER)')
hive_cursor.execute("insert into default.demo_table_ibis4 values ('Monday', 50)")
hive_cursor.execute("insert into default.demo_table_ibis4 values ('Monday', 20)")
hive_cursor.execute("insert into default.demo_table_ibis4 values ('Tuesday', 50)")
hive_cursor.execute("insert into default.demo_table_ibis4 values ('Tuesday', 100)")
hive_cursor.execute('SELECT * FROM default.demo_table_ibis4 LIMIT 100')
hive_cursor.execute("SELECT day, avg(sales) as avg FROM default.demo_table_ibis4 group by day ")
df_hive = pd.DataFrame(hive_cursor.fetchall(), columns=[col[0] for col in hive_cursor.description])
df_hive
df_hive.groupby("demo_table_ibis4.day").mean("demo_table_ibis4.sales")
ibis.options.interactive = True
ibis.options.verbose = True
hello_world = client_ibis.database("default").table('demo_table_ibis4')
hello_world
hello_world \
.group_by('day') \
.aggregate( \
avg=hello_world.sales.mean() \
) \
.execute()
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
hive Expression Not In Group By Key - Stack Overflow
The full error message should be in the format Expression Not In Group By Key [value] . The [value] will tell you what...
Read more >HIVE SQL [Error 10025]: Expression not in GROUP BY key
I want to GROUP by & HAVING based on column 'ip_address', if more than 20 records. SELECT day, ip_address, user, request FROM my_table...
Read more >Group by one variable with selecting more than one... - 111412
Error while compiling statement : FAILED: SemanticException [Error 10025]: Line 10:0 Expression not in GROUP BY key 'prov_id_new'.
Read more >Aggregated Expression not in GROUP BY key
Hi, I am using Hive 1.2, and I am trying to run some queries based on TPCH schema. My original query is: SELECT...
Read more >hive - "Expression Not In Group By Key" - Just one line it
First of a long series as I am starting to use Hive on a daily basis for a data mining project. Ever got...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This looks more like a question, let’s try and keep that separate from your original issue.
I can confirm that this setting allows
GROUP BY 1
to work using the docker compose setup here: https://github.com/big-data-europe/docker-hive.