-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CH] Got Exception: The order of aggregation result columns is invalid #8142
Comments
The grouping keys are
There are duplicated |
Does not following distinct work? Lines 165 to 172 in ff945f9
|
problems 10: jdbc:hive2://localhost:10000> explain select days, rtime, uid, owner, day1 from(select day1 as days, rtime, uid, owner, day1 from (select distinct coalesce(day, "today") as day1, rtime, uid, owner from test_7096 where day = '2024-09-01')) group by days, rtime, uid, owner, day1;
+----------------------------------------------------+
| plan |
+----------------------------------------------------+
| == Physical Plan ==
CHNativeColumnarToRow
+- ^(2) HashAggregateTransformer(keys=[day1#0, rtime#8, uid#9, owner#10], functions=[], isStreamingAgg=false)
+- ^(2) InputIteratorTransformer[day1#0, rtime#8, uid#9, owner#10]
+- ColumnarExchange hashpartitioning(day1#0, rtime#8, uid#9, owner#10, day1#0, 5), ENSURE_REQUIREMENTS, [plan_id=155], [shuffle_writer_type=hash], [OUTPUT] ArrayBuffer(day1:StringType, rtime:IntegerType, uid:StringType, owner:StringType)
+- ^(1) HashAggregateTransformer(keys=[day1#0, rtime#8, uid#9, owner#10], functions=[], isStreamingAgg=false)
+- ^(1) ProjectExecTransformer [coalesce(day#7, today) AS day1#0, rtime#8, uid#9, owner#10]
+- ^(1) FilterExecTransformer (isnotnull(day#7) AND (day#7 = 2024-09-01))
+- ^(1) NativeScan hive default.test_7096 [day#7, owner#10, rtime#8, uid#9], HiveTableRelation [`default`.`test_7096`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [day#7, rtime#8, uid#9, owner#10], Partition Cols: []]
|
+----------------------------------------------------+ If we make columns are unique in grouping keys and aggregate results. There is mismatch between aggregate result and output. 2If we remove distinct in grouping keys and aggregate results, above query also fail
This is caused by |
Backend
CH (ClickHouse)
Bug description
Spark version
None
Spark configurations
No response
System information
No response
Relevant logs
No response
The text was updated successfully, but these errors were encountered: