Skip to content

Commit

Permalink
Clean.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Oct 24, 2024
1 parent e0f3ddd commit 5ee1966
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/optimization/table_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ func (t *TableData) MergeColumnsFromDestination(destCols ...columns.Column) erro

// mergeColumn - This function will merge the in-memory column with the destination column.
func mergeColumn(inMemoryCol columns.Column, destCol columns.Column) columns.Column {
// Copy over the kind
inMemoryCol.KindDetails.Kind = destCol.KindDetails.Kind
// Copy over backfilled
inMemoryCol.SetBackfilled(destCol.Backfilled())
Expand All @@ -297,11 +296,6 @@ func mergeColumn(inMemoryCol columns.Column, destCol columns.Column) columns.Col
inMemoryCol.KindDetails.OptionalIntegerKind = destCol.KindDetails.OptionalIntegerKind
}

// Copy over the decimal details
if destCol.KindDetails.ExtendedDecimalDetails != nil && inMemoryCol.KindDetails.ExtendedDecimalDetails == nil {
inMemoryCol.KindDetails.ExtendedDecimalDetails = destCol.KindDetails.ExtendedDecimalDetails
}

// Copy over the time details
if destCol.KindDetails.ExtendedTimeDetails != nil {
if inMemoryCol.KindDetails.ExtendedTimeDetails == nil {
Expand All @@ -322,5 +316,10 @@ func mergeColumn(inMemoryCol columns.Column, destCol columns.Column) columns.Col

}

// Copy over the decimal details
if destCol.KindDetails.ExtendedDecimalDetails != nil && inMemoryCol.KindDetails.ExtendedDecimalDetails == nil {
inMemoryCol.KindDetails.ExtendedDecimalDetails = destCol.KindDetails.ExtendedDecimalDetails
}

return inMemoryCol
}

0 comments on commit 5ee1966

Please sign in to comment.