Skip to content

Commit

Permalink
Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Oct 23, 2024
1 parent 75aff02 commit b4d2ca0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/optimization/table_data.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package optimization

import (
"cmp"
"fmt"
"strings"
"time"
Expand Down Expand Up @@ -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())

Expand All @@ -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)

}

Expand Down

0 comments on commit b4d2ca0

Please sign in to comment.