Skip to content

Commit f9ce4e4

Browse files
committed
Tweak translation of convertRow behavior
1 parent deb013c commit f9ce4e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/redshift/driver/rows.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ func (r *Rows) fetchNextPage(token *string) error {
197197
// https://docs.aws.amazon.com/redshift/latest/mgmt/jdbc20-data-type-mapping.html
198198
func convertRow(columns []redshiftdatatypes.ColumnMetadata, data []redshiftdatatypes.Field, ret []driver.Value) error {
199199
for i, curr := range data {
200-
// FIXME: I think this is the correct translation of the existing behavior but I'm not
201-
// sure it's actually the correct behavior
202-
if isNull, ok := curr.(*redshiftdatatypes.FieldMemberIsNull); ok {
200+
// FIXME: I think this is the correct translation of the previous aws-sdk-v1 behavior
201+
// but I'm not sure it's actually the correct behavior
202+
if isNull, ok := curr.(*redshiftdatatypes.FieldMemberIsNull); ok && isNull.Value {
203203
if isNull.Value {
204204
ret[i] = nil
205205
}

0 commit comments

Comments
 (0)