Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov committed Dec 14, 2024
1 parent 00a1381 commit f0f5382
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions examples/bulk_upsert/apache_arrow/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ func fillTopicCommits(ctx context.Context, db *ydb.Driver) {

err = json.Unmarshal(content, &commit)
if err == nil {
messages = append(messages, topicwriter.Message{Data: bytes.NewReader(scanner.Bytes())})
data, err := json.Marshal(commit)
if err != nil {
panic(err)
}

messages = append(messages, topicwriter.Message{Data: bytes.NewReader(data)})

date, err := time.Parse("2006-01-02 15:04:05", commit.Date)
if err != nil {
Expand Down Expand Up @@ -290,10 +295,10 @@ func getCommitStats(ctx context.Context, db *ydb.Driver, year int) (commits int6
if date.Year() == year {
commits++
}
//} else {
// fmt.Println(string(content))
//
// panic(err)
} else {
fmt.Println(string(content))

panic(err)
}
}

Expand Down

0 comments on commit f0f5382

Please sign in to comment.