From e7cbf2a7d0df96cad27b159c90723296005a0e42 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Fri, 26 Apr 2024 16:07:21 -0700 Subject: [PATCH] Additional merge predicate column. --- clients/snowflake/writes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/snowflake/writes.go b/clients/snowflake/writes.go index 5ad4c17da..01bb7ccd0 100644 --- a/clients/snowflake/writes.go +++ b/clients/snowflake/writes.go @@ -56,8 +56,8 @@ func (s *Store) Merge(tableData *optimization.TableData) error { var additionalEqualityStrings []string if len(tableData.TopicConfig().AdditionalMergePredicates) > 0 { for _, additionalMergePredicate := range tableData.TopicConfig().AdditionalMergePredicates { - mergePredicateColumn := sql.EscapeName(additionalMergePredicate.PartitionField, s.ShouldUppercaseEscapedNames(), s.Label()) - additionalEqualityStrings = append(additionalEqualityStrings, fmt.Sprintf("c.%s = cc.%s", mergePredicateColumn, mergePredicateColumn)) + mergePredicateCol := sql.EscapeName(additionalMergePredicate.PartitionField, s.ShouldUppercaseEscapedNames(), s.Label()) + additionalEqualityStrings = append(additionalEqualityStrings, fmt.Sprintf("c.%s = cc.%s", mergePredicateCol, mergePredicateCol)) } }