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
It causes resolution error in Comet when Comet tries to translate partitioning expressions:
[info] - transformWithMapState - batch should succeed (without changelog checkpointing) *** FAILED *** (23 milliseconds)
[info] org.apache.spark.SparkException: [INTERNAL_ERROR] Couldn't find value#667 in [value#672] SQLSTATE: XX000
[info] at org.apache.spark.SparkException$.internalError(SparkException.scala:92)
[info] at org.apache.spark.SparkException$.internalError(SparkException.scala:96)
[info] at org.apache.spark.sql.catalyst.expressions.BindReferences$$anonfun$bindReference$1.applyOrElse(BoundAttribute.scala:81)
[info] at org.apache.spark.sql.catalyst.expressions.BindReferences$$anonfun$bindReference$1.applyOrElse(BoundAttribute.scala:74)
[info] at org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$transformDownWithPruning$1(TreeNode.scala:458)
[info] at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(origin.scala:84)
[info] at org.apache.spark.sql.catalyst.trees.TreeNode.transformDownWithPruning(TreeNode.scala:458)
[info] at org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:434)
[info] at org.apache.spark.sql.catalyst.trees.TreeNode.transform(TreeNode.scala:402)
[info] at org.apache.spark.sql.catalyst.expressions.BindReferences$.bindReference(BoundAttribute.scala:74)
[info] at org.apache.comet.serde.QueryPlanSerde$.exprToProtoInternal$1(QueryPlanSerde.scala:1714)
[info] at org.apache.comet.serde.QueryPlanSerde$.exprToProto(QueryPlanSerde.scala:2565)
[info] at org.apache.comet.serde.QueryPlanSerde$.$anonfun$supportPartitioning$1(QueryPlanSerde.scala:3184)
TransformWithStateExec is a special operator. It is a binary operator which has child and initialState as left and right nodes. Different to regular binary node, TransformWithStateExec doesn't always run both child operators. It only executes initialState once its hasInitialState is true. If it is false, TransformWithStateExec's initialState and related parameters are useless. In the situation, Spark will assign pseudo value (i.e., groupingAttributes) to initialStateGroupingAttrs, etc.
Because groupingAttributes is bound to child node, the partitioning expressions created by it cannot be bound to initialState.
Steps to reproduce
No response
Expected behavior
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
In #924, we found that Spark sometimes produces exchange partitioning where the partitioning expression cannot be resolved correctly.
For example:
It causes resolution error in Comet when Comet tries to translate partitioning expressions:
TransformWithStateExec
is a special operator. It is a binary operator which haschild
andinitialState
as left and right nodes. Different to regular binary node,TransformWithStateExec
doesn't always run both child operators. It only executesinitialState
once itshasInitialState
is true. If it is false,TransformWithStateExec
'sinitialState
and related parameters are useless. In the situation, Spark will assign pseudo value (i.e.,groupingAttributes
) toinitialStateGroupingAttrs
, etc.Because
groupingAttributes
is bound tochild
node, the partitioning expressions created by it cannot be bound toinitialState
.Steps to reproduce
No response
Expected behavior
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: