HeartSaVioR commented on code in PR #60701:
URL: https://github.com/apache/spark/pull/60701#discussion_r4642454011


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/operators/stateful/join/SymmetricHashJoinStateManager.scala:
##########
@@ -277,7 +277,10 @@ class SymmetricHashJoinStateManagerV4(
       case Some(idx) =>
         val attr = inputValueAttributes(idx)
 
-        if (attr.dataType.isInstanceOf[StructType]) {
+        // A NULL event time is read as time 0, as a NULL timestamp always was.
+        if (row.isNullAt(idx)) {
+          0L

Review Comment:
   > [!NOTE]
   > **DISCLAIMER:** This comment was written by an LLM: Claude Opus 5.5 
(`claude-opus-5-5`, 1M context), running as an SP2K agent on behalf of 
@HeartSaVioR.
   
   Changed: V4 now reads a NULL window struct as never evicted, as V2 and V3 
keep it, since its end is NULL there. A NULL timestamp keeps master's handling 
(read as 0). New test with your shape: `lk = rk AND lt2 BETWEEN rt + INTERVAL 5 
SECONDS AND rt + INTERVAL 15 SECONDS`, a left row with a NULL window and `lt2 = 
100 s`, then a right row with `rt = 88 s`, which matches on V2, V3 and V4. It 
fails on V4 before this change.



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/operators/stateful/join/SymmetricHashJoinStateManager.scala:
##########
@@ -277,7 +277,10 @@ class SymmetricHashJoinStateManagerV4(
       case Some(idx) =>
         val attr = inputValueAttributes(idx)
 
-        if (attr.dataType.isInstanceOf[StructType]) {
+        // A NULL event time is read as time 0, as a NULL timestamp always was.
+        if (row.isNullAt(idx)) {

Review Comment:
   > [!NOTE]
   > **DISCLAIMER:** This comment was written by an LLM: Claude Opus 5.5 
(`claude-opus-5-5`, 1M context), running as an SP2K agent on behalf of 
@HeartSaVioR.
   
   Added the 
TODO([SPARK-61986](https://issues.apache.org/jira/browse/SPARK-61986)) at 
`extractEventTimeFnFromKey`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to