You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Mihailo Aleksic (Jira)" <ji...@apache.org> on 2024/10/15 07:57:00 UTC

[jira] [Commented] (SPARK-49689) EventTimeWatermark to support TimestampNTZType

    [ https://issues.apache.org/jira/browse/SPARK-49689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17889536#comment-17889536 ] 

Mihailo Aleksic commented on SPARK-49689:
-----------------------------------------

Hi [~harikishore], hope you are doing well. Could you please provide a query that's going to fail because of this issue? Thanks in advance

> EventTimeWatermark to support TimestampNTZType
> ----------------------------------------------
>
>                 Key: SPARK-49689
>                 URL: https://issues.apache.org/jira/browse/SPARK-49689
>             Project: Spark
>          Issue Type: Bug
>          Components: Structured Streaming
>    Affects Versions: 3.4.0, 3.4.1, 3.5.0, 3.5.1, 3.5.2, 3.4.3
>            Reporter: harikishore
>            Priority: Major
>             Fix For: 3.5.2
>
>
> Spark added TimestampNTZType support since 3.4.0. [https://spark.apache.org/docs/3.4.0/api/java/org/apache/spark/sql/types/TimestampNTZType.html]
> However, EventTimeWatermark with TimestampNTZType fails analysis check.
>  
> {code:java}
> case etw: EventTimeWatermark =>
>             etw.eventTime.dataType match {
>               case s: StructType
>                 if s.find(_.name == "end").map(_.dataType) == Some(TimestampType) =>
>               case _: TimestampType =>
>               case _ =>
>                 etw.failAnalysis(
>                   errorClass = "EVENT_TIME_IS_NOT_ON_TIMESTAMP_TYPE",
>                   messageParameters = Map(
>                     "eventName" -> toSQLId(etw.eventTime.name),
>                     "eventType" -> toSQLType(etw.eventTime.dataType)))
>             } {code}
> Both *FilterPushdownSuite.scala* and *AnalysisSuite.scala* don't explicitly avoid timestampNTZ. Moreover, from *StatefulAggregationStrategy* --> {*}EventTimeWatermarkExec{*}, even if the eventTime is of type TimestampNTZType, it should be handled as per {*}datetimeExpressions{*}.{*}scala{*}. It is also supported in Window Expressions {*}WindowSpecDefinition ->  isValidFrameType{*}.



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