[SPARK-36046][SQL][FOLLOWUP] Implement prettyName for MakeTimestampNTZ and MakeTimestampLTZ
### What changes were proposed in this pull request? This PR follows https://github.com/apache/spark/pull/33299 and implement `prettyName` for `MakeTimestampNTZ` and `MakeTimestampLTZ` based on the discussion show below https://github.com/apache/spark/pull/33299/files#r668423810 ### Why are the changes needed? This PR fix the incorrect alias usecase. ### Does this PR introduce _any_ user-facing change? 'No'. Modifications are transparent to users. ### How was this patch tested? Jenkins test. Closes #33430 from beliefer/SPARK-36046-followup. Authored-by: gengjiaan <gengjiaan@360.cn> Signed-off-by: Gengliang Wang <gengliang@apache.org>
This commit is contained in:
parent
801b369bd0
commit
033a5731b4
|
@ -555,8 +555,8 @@ object FunctionRegistry {
|
|||
expression[SessionWindow]("session_window"),
|
||||
expression[MakeDate]("make_date"),
|
||||
expression[MakeTimestamp]("make_timestamp"),
|
||||
expression[MakeTimestampNTZ]("make_timestamp_ntz", true),
|
||||
expression[MakeTimestampLTZ]("make_timestamp_ltz", true),
|
||||
expression[MakeTimestampNTZ]("make_timestamp_ntz"),
|
||||
expression[MakeTimestampLTZ]("make_timestamp_ltz"),
|
||||
expression[MakeInterval]("make_interval"),
|
||||
expression[MakeDTInterval]("make_dt_interval"),
|
||||
expression[MakeYMInterval]("make_ym_interval"),
|
||||
|
|
|
@ -2403,6 +2403,8 @@ case class MakeTimestampNTZ(
|
|||
MakeTimestamp(year, month, day, hour, min, sec, dataType = TimestampNTZType))
|
||||
}
|
||||
|
||||
override def prettyName: String = "make_timestamp_ntz"
|
||||
|
||||
override def exprsReplaced: Seq[Expression] = Seq(year, month, day, hour, min, sec)
|
||||
|
||||
override protected def withNewChildInternal(newChild: Expression): Expression =
|
||||
|
@ -2473,6 +2475,8 @@ case class MakeTimestampLTZ(
|
|||
MakeTimestamp(year, month, day, hour, min, sec, Some(timezone), dataType = TimestampType))
|
||||
}
|
||||
|
||||
override def prettyName: String = "make_timestamp_ltz"
|
||||
|
||||
override def exprsReplaced: Seq[Expression] = Seq(year, month, day, hour, min, sec)
|
||||
|
||||
override protected def withNewChildInternal(newChild: Expression): Expression =
|
||||
|
|
Loading…
Reference in a new issue