You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "taiyang-li (via GitHub)" <gi...@apache.org> on 2025/03/31 03:55:23 UTC
[I] [CH] CSE in aggregate operator not working [incubator-gluten]
taiyang-li opened a new issue, #9178:
URL: https://github.com/apache/incubator-gluten/issues/9178
### Backend
CH (ClickHouse)
### Bug description
Maybe caused by https://github.com/apache/incubator-gluten/pull/8376/files
`hash(id)` could not be extracted as common subexpression after this PR.
``` sql
0: jdbc:hive2://localhost:10000/> explain extended select id % 2, max(hash(id)), min(hash(id)) from range(10) group by id % 2
. . . . . . . . . . . . . . . . > ;
+----------------------------------------------------+
| plan |
+----------------------------------------------------+
| == Parsed Logical Plan ==
'Aggregate [('id % 2)], [unresolvedalias(('id % 2), None), unresolvedalias('max('hash('id)), None), unresolvedalias('min('hash('id)), None)]
+- 'UnresolvedTableValuedFunction range, [10]
== Analyzed Logical Plan ==
(id % 2): bigint, max(hash(id)): int, min(hash(id)): int
Aggregate [(id#1798L % cast(2 as bigint))], [(id#1798L % cast(2 as bigint)) AS (id % 2)#1801L, max(hash(id#1798L, 42)) AS max(hash(id))#1802, min(hash(id#1798L, 42)) AS min(hash(id))#1803]
+- Range (0, 10, step=1, splits=None)
== Optimized Logical Plan ==
Aggregate [_groupingexpression#1804L], [_groupingexpression#1804L AS (id % 2)#1801L, max(hash(id#1798L, 42)) AS max(hash(id))#1802, min(hash(id#1798L, 42)) AS min(hash(id))#1803]
+- Project [id#1798L, (id#1798L % 2) AS _groupingexpression#1804L]
+- Range (0, 10, step=1, splits=None)
== Physical Plan ==
CHNativeColumnarToRow
+- ^(163) HashAggregateTransformer(keys=[_groupingexpression#1804L], functions=[max(_pre_80#1810), min(_pre_80#1810)], isStreamingAgg=false, output=[(id % 2)#1801L, max(hash(id))#1802, min(hash(id))#1803])
+- ^(163) ProjectExecTransformer [(id#1798L % 2) AS _groupingexpression#1804L, hash(id#1798L, 42) AS _pre_80#1810]
+- ^(163) CHRangeExecTransformer 0, 10, 1, 1, 10, [id#1798L]
|
+----------------------------------------------------+
```
### Spark version
None
### Spark configurations
_No response_
### System information
_No response_
### Relevant logs
```bash
```
--
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: commits-unsubscribe@gluten.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [I] [CH] CSE in aggregate operator not working [incubator-gluten]
Posted by "taiyang-li (via GitHub)" <gi...@apache.org>.
taiyang-li closed issue #9178: [CH] CSE in aggregate operator not working
URL: https://github.com/apache/incubator-gluten/issues/9178
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org
Re: [I] [CH] CSE in aggregate operator not working [incubator-gluten]
Posted by "loneylee (via GitHub)" <gi...@apache.org>.
loneylee commented on issue #9178:
URL: https://github.com/apache/incubator-gluten/issues/9178#issuecomment-2765232778
@taiyang-li let me see see
--
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: commits-unsubscribe@gluten.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org