HeartSaVioR commented on a change in pull request #26108: [SPARK-26154][SS]
Streaming left/right outer join should not return outer nulls for already
matched rows
URL: https://github.com/apache/spark/pull/26108#discussion_r339283254
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StreamingSymmetricHashJoinExec.scala
##########
@@ -139,13 +141,20 @@ case class StreamingSymmetricHashJoinExec(
rightKeys: Seq[Expression],
joinType: JoinType,
condition: Option[Expression],
+ stateFormatVersion: Int,
left: SparkPlan,
right: SparkPlan) = {
this(
leftKeys, rightKeys, joinType, JoinConditionSplitPredicates(condition,
left, right),
stateInfo = None, eventTimeWatermark = None,
- stateWatermarkPredicates = JoinStateWatermarkPredicates(), left, right)
+ stateWatermarkPredicates = JoinStateWatermarkPredicates(),
stateFormatVersion, left, right)
+ }
+
+ if (stateFormatVersion < 2 && joinType != Inner) {
+ logError(s"The query is using stream-stream outer join with state format
version" +
Review comment:
So the impact matters. They need to discard checkpoint and replay the query
with their previous inputs from the scratch. The impact would depend on how
much data they need to replay - join may store rows depending on the condition
of join, may couple of hours, even days (though it doesn't seem to be realistic
in production).
Maybe replaying couple of hours of inputs wouldn't matter too much, and they
still be able to run the query with old Spark version, so yes I agree it
wouldn't be so horrible if we guide how to discard checkpoint and rerun the
query.
Btw, as I described below, we may try to provide offline migration tool -
though this patch shouldn't be blocked by that.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]