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 2024/12/06 02:30:00 UTC

[jira] [Assigned] (SPARK-50492) Fix java.util.NoSuchElementException when event time column is dropped after dropDuplicatesWithinWatermark

     [ https://issues.apache.org/jira/browse/SPARK-50492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jungtaek Lim reassigned SPARK-50492:
------------------------------------

    Assignee: Livia Zhu

> Fix java.util.NoSuchElementException when event time column is dropped after dropDuplicatesWithinWatermark
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-50492
>                 URL: https://issues.apache.org/jira/browse/SPARK-50492
>             Project: Spark
>          Issue Type: Task
>          Components: Structured Streaming
>    Affects Versions: 4.0.0
>            Reporter: Livia Zhu
>            Assignee: Livia Zhu
>            Priority: Major
>              Labels: pull-request-available
>
> Consider the following query:
> ```
> val result = inputData.toDF()
> .select("_1", "_2")
> .withColumn("timestamp", to_timestamp($"_2", "yyyy-MM-dd HH:mm:ss"))
> .withWatermark("timestamp", "24 hours")
> .dropDuplicatesWithinWatermark("timestamp")
> .select("_1")[]
> ```
>  
> Currently, the ColumnPruning optimization will prune the `timestamp` column since it is not selected in the final Project, leading to a `java.util.NoSuchElementException` when we try to get the event time column in DeduplicateWithinWatermarkExec.
>  
> We need to update the references for the DeduplicateWithinWatermark logical plan node so that the event time column is included in the references.



--
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