Skip to content

Commit 923eb29

Browse files
KKouldsundy-li
andauthored
chore: DataType::TimestampTz display: "TimestampTz" -> "Timestamp_Tz" (#18931)
chore: DataType::TimestampTz display “TimestampTz” -> “Timestamp_Tz” Co-authored-by: sundyli <[email protected]>
1 parent abf430c commit 923eb29

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/query/expression/src/schema.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,7 @@ impl TableDataType {
14371437
TableDataType::Nullable(inner_ty) => {
14381438
format!("Nullable({})", inner_ty.wrapped_display())
14391439
}
1440+
TableDataType::TimestampTz => "Timestamp_Tz".to_string(),
14401441
TableDataType::Tuple { fields_type, .. } => {
14411442
format!(
14421443
"Tuple({})",

src/query/expression/src/types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ impl DataType {
391391
pub fn wrapped_display(&self) -> String {
392392
match self {
393393
DataType::Nullable(inner_ty) => format!("Nullable({})", inner_ty.wrapped_display()),
394+
DataType::TimestampTz => "Timestamp_Tz".to_string(),
394395
_ => format!("{}", self),
395396
}
396397
}
@@ -412,6 +413,7 @@ impl DataType {
412413
.to_string(),
413414
DataType::String => "VARCHAR".to_string(),
414415
DataType::Nullable(inner_ty) => format!("{} NULL", inner_ty.sql_name()),
416+
DataType::TimestampTz => "TIMESTAMP_TZ".to_string(),
415417
_ => self.to_string().to_uppercase(),
416418
}
417419
}

0 commit comments

Comments
 (0)