You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CometHashAggregate prefixed with ! in explain plan #2214
The spark codebase here says - they use "!" to indicate an invalid plan, and "'" to indicate an unresolved plan. However, I haven't verified, if this is the only place in the code from where ! gets added to the plan.
I filed this issue after seeing that comment in the spark code to bring this to notice.
Spark considers count#51L to be as input, and thinks it is missing. This is the reason for exclamation mark
UPD: Spark HashAggregate.producedAttributes contains count values, where CometHashAggregate does not, refer to the code below, that's causing the exclamation mark.
final def missingInput: AttributeSet = references -- inputSet
lazy val references: AttributeSet = {
AttributeSet.fromAttributeSets(expressions.map(_.references)) -- producedAttributes
}
It does seem it is not an issue with wrong plan @andygrove should we address this in 0.11.0?
Spark considers count#51L to be as input, and thinks it is missing. This is the reason for exclamation mark
UPD: Spark HashAggregate.producedAttributes contains count values, where CometHashAggregate does not, refer to the code below, that's causing the exclamation mark.
final def missingInput: AttributeSet = references -- inputSet
lazy val references: AttributeSet = {
AttributeSet.fromAttributeSets(expressions.map(_.references)) -- producedAttributes
}
It does seem it is not an issue with wrong plan @andygrove should we address this in 0.11.0?
Yes, I think it would be good to fix this for 0.11.0.
Activity
andygrove commentedon Sep 15, 2025
I started debugging this, and
CometHashAggregateExec.missingInputscontains values, which leads to the warnings.In
CometHashAggregateExec, I updated the code:Here is an example output:
comphead commentedon Sep 15, 2025
I remember hitting this
!on other operators, likeCometTakeOrderedAndProject, checking itcomphead commentedon Sep 15, 2025
@rishvin does it happen with AQE only?
comphead commentedon Sep 15, 2025
This is interesting as
!usually says the reference from preceding plan node is missing, which looks okay hereand it still warns without AQE
comphead commentedon Sep 15, 2025
Spark considers
count#51Lto be as input, and thinks it is missing. This is the reason for exclamation markUPD: Spark
HashAggregate.producedAttributescontains count values, whereCometHashAggregatedoes not, refer to the code below, that's causing the exclamation mark.It does seem it is not an issue with wrong plan
@andygrove should we address this in 0.11.0?
andygrove commentedon Sep 15, 2025
Yes, I think it would be good to fix this for 0.11.0.