From b4d2ca0889ac74774ca42b80f07a383cead34b4b Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Wed, 23 Oct 2024 13:18:37 -0700 Subject: [PATCH] Clean up. --- lib/optimization/table_data.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/optimization/table_data.go b/lib/optimization/table_data.go index bae801623..b4eae29ce 100644 --- a/lib/optimization/table_data.go +++ b/lib/optimization/table_data.go @@ -1,6 +1,7 @@ package optimization import ( + "cmp" "fmt" "strings" "time" @@ -273,7 +274,6 @@ func (t *TableData) MergeColumnsFromDestination(destCols ...columns.Column) erro if found { inMemoryCol.KindDetails.Kind = foundColumn.KindDetails.Kind - // Copy over backfilled inMemoryCol.SetBackfilled(foundColumn.Backfilled()) @@ -300,8 +300,10 @@ func (t *TableData) MergeColumnsFromDestination(destCols ...columns.Column) erro } } - // Just copy over the type since the format wouldn't be present in the destination + // Copy over the type inMemoryCol.KindDetails.ExtendedTimeDetails.Type = foundColumn.KindDetails.ExtendedTimeDetails.Type + // If the in-memory column has no format, we should use the format from the destination. + inMemoryCol.KindDetails.ExtendedTimeDetails.Format = cmp.Or(inMemoryCol.KindDetails.ExtendedTimeDetails.Format, foundColumn.KindDetails.ExtendedTimeDetails.Format) }