You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jungtaek Lim (Jira)" <ji...@apache.org> on 2023/11/23 05:06:00 UTC

[jira] [Created] (SPARK-46064) EliminateEventTimeWatermark does not consider the fact that isStreaming flag can change for current child during resolution

Jungtaek Lim created SPARK-46064:
------------------------------------

             Summary: EliminateEventTimeWatermark does not consider the fact that isStreaming flag can change for current child during resolution
                 Key: SPARK-46064
                 URL: https://issues.apache.org/jira/browse/SPARK-46064
             Project: Spark
          Issue Type: Bug
          Components: Structured Streaming
    Affects Versions: 3.5.0, 3.4.1, 3.3.2, 4.0.0
            Reporter: Jungtaek Lim


Looks like this is a long standing bug.

The object `EliminateEventTimeWatermark` is implemented as a rule, but it is not registered in analyzer/optimizer. Instead, it is called directly when withWatermark method is called, which means the rule is applied immediately against the child, regardless whether child is resolved or not.

It is not an issue for the usage of pure DataFrame API because streaming sources have the flag isStreaming set to true even it is yet resolved, but mix-up of SQL and DataFrame API would expose the issue; we may not know the exact value of isStreaming flag on unresolved node and it is subject to change upon resolution.

We should register EliminateEventTimeWatermark as a rule on analysis (or pre-optimization) instead, and do not apply the elimination if the child is not yet resolved.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org