Skip to content

Commit

Permalink
Checkpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Jun 17, 2024
1 parent b2524fe commit 1805e9a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions clients/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func buildLegacyRows(tableData *optimization.TableData, additionalDateFmts []str
return nil, fmt.Errorf("failed to cast col %q: %w", col.Name(), err)
}

fmt.Println("col.Name", col.Name(), "colKind", col.KindDetails, "colVal", colVal, fmt.Sprintf("colVal type: %T", colVal))
if colVal != nil {
data[col.Name()] = colVal
}
Expand Down
5 changes: 5 additions & 0 deletions clients/bigquery/cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ func castColVal(colVal any, colKind columns.Column, additionalDateFmts []string)
}

switch colKind.KindDetails.Kind {
<<<<<<< Updated upstream

Check failure on line 24 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected <<, expected case or default or }

Check failure on line 24 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected <<, expected case or default or }
case typing.String.Kind:

Check failure on line 25 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected case, expected :

Check failure on line 25 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected case, expected :
if val, isOk := colVal.(*decimal.Decimal); isOk {
return val.String(), nil
}

return colVal, nil
=======

Check failure on line 31 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected ==, expected case or default or }

Check failure on line 31 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected ==, expected case or default or }
return fmt.Sprint(colVal), nil

Check failure on line 32 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected return, expected :

>>>>>>> Stashed changes

Check failure on line 34 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected >>, expected case or default or }
case typing.Float.Kind, typing.Integer.Kind, typing.Boolean.Kind:

Check failure on line 35 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected case, expected :
return colVal, nil

Check failure on line 36 in clients/bigquery/cast.go

View workflow job for this annotation

GitHub Actions / test

syntax error: unexpected return at end of statement (compile)
case typing.EDecimal.Kind:
Expand Down
2 changes: 2 additions & 0 deletions lib/cdc/relational/debezium.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
type Debezium string

func (d *Debezium) GetEventFromBytes(_ typing.Settings, bytes []byte) (cdc.Event, error) {
fmt.Println("string", string(bytes))

var event util.SchemaEventPayload
if len(bytes) == 0 {
return nil, fmt.Errorf("empty message")
Expand Down
7 changes: 7 additions & 0 deletions lib/destination/types/table_config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package types

import (
"fmt"
"log/slog"
"maps"
"sync"
Expand All @@ -26,6 +27,12 @@ func NewDwhTableConfig(columns *columns.Columns, colsToDelete map[string]time.Ti
colsToDelete = make(map[string]time.Time)
}

if columns != nil {
for _, col := range columns.GetColumns() {
fmt.Println("colName", col.Name(), "colKind", col.KindDetails)
}
}

return &DwhTableConfig{
columns: columns,
columnsToDelete: colsToDelete,
Expand Down

0 comments on commit 1805e9a

Please sign in to comment.