Skip to content

Commit

Permalink
[BigQuery] Use BIGNUMERIC (#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 authored Nov 21, 2024
1 parent 0c161d3 commit 1671942
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/shared/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func Merge(ctx context.Context, dwh destination.DataWarehouse, tableData *optimi
}
}()

if err = dwh.PrepareTemporaryTable(ctx, tableData, tableConfig, temporaryTableID, tableID, types.AdditionalSettings{}, true); err != nil {
if err = dwh.PrepareTemporaryTable(ctx, tableData, tableConfig, temporaryTableID, tableID, types.AdditionalSettings{ColumnSettings: opts.ColumnSettings}, true); err != nil {
return fmt.Errorf("failed to prepare temporary table: %w", err)
}

Expand Down
2 changes: 1 addition & 1 deletion lib/typing/decimal/details.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (d Details) RedshiftKind() string {
// BigQueryKind - is inferring logic from: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#decimal_types
func (d Details) BigQueryKind(numericTypeForVariableNumeric bool) string {
if numericTypeForVariableNumeric && d.precision == PrecisionNotSpecified {
return "NUMERIC"
return "BIGNUMERIC"
}

if d.isNumeric() {
Expand Down
2 changes: 1 addition & 1 deletion lib/typing/decimal/details_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestDetails_BigQueryKind(t *testing.T) {
}
{
// numericTypeForVariableNumeric = true
assert.Equal(t, "NUMERIC", details.BigQueryKind(true))
assert.Equal(t, "BIGNUMERIC", details.BigQueryKind(true))
}
}

Expand Down

0 comments on commit 1671942

Please sign in to comment.