Skip to content

Commit

Permalink
Update with comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 committed Dec 28, 2024
1 parent 99a75c5 commit df6b3ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clients/redshift/dialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ func (rd RedshiftDialect) BuildIsNotToastValueExpression(tableAlias constants.Ta

switch column.KindDetails {
case typing.Struct, typing.Array:
// We need to use JSON_SIZE to check if the column can be serialized into a VARCHAR
// If the value is greater than 500 characters, it's likely not going to be toasted, so we can skip the check.
return fmt.Sprintf(`
COALESCE(
CASE
Expand Down

0 comments on commit df6b3ee

Please sign in to comment.