Skip to content

Commit

Permalink
fixed review comments pt.2
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Jan 9, 2024
1 parent 458f274 commit 2312916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flow/connectors/bigquery/merge_statement_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (m *mergeStmtGenerator) generateMergeStmts() []string {
// TODO (kaushik): This is so that the statement size for individual merge statements
// doesn't exceed the limit. We should make this configurable.
const batchSize = 8
partitions := utils.ArrayChunksGen(m.unchangedToastColumns, batchSize)
partitions := utils.ArrayChunks(m.unchangedToastColumns, batchSize)

mergeStmts := make([]string, 0, len(partitions))
for _, partition := range partitions {
Expand Down
2 changes: 1 addition & 1 deletion flow/connectors/utils/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func ArrayMinus(first []string, second []string) []string {
return result
}

func ArrayChunksGen[T any](slice []T, size int) [][]T {
func ArrayChunks[T any](slice []T, size int) [][]T {
var chunks [][]T

for size < len(slice) {
Expand Down

0 comments on commit 2312916

Please sign in to comment.