From 2b5d90d9ad41c5e1a5247450876997d0a164aad2 Mon Sep 17 00:00:00 2001 From: Amogh-Bharadwaj Date: Thu, 8 Feb 2024 02:02:51 +0530 Subject: [PATCH] set to nil --- flow/connectors/postgres/qvalue_convert.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flow/connectors/postgres/qvalue_convert.go b/flow/connectors/postgres/qvalue_convert.go index 65b1492c88..cdf2b27c70 100644 --- a/flow/connectors/postgres/qvalue_convert.go +++ b/flow/connectors/postgres/qvalue_convert.go @@ -518,12 +518,13 @@ func parseFieldFromPostgresOID(oid uint32, value interface{}) (qvalue.QValue, er func numericToRat(numVal *pgtype.Numeric) (*big.Rat, error) { if numVal.Valid { if numVal.NaN { - return nil, errors.New("numeric value is NaN") + // set to nil if NaN + return nil, nil } switch numVal.InfinityModifier { case pgtype.NegativeInfinity, pgtype.Infinity: - return nil, errors.New("numeric value is infinity") + return nil, nil } rat := new(big.Rat).SetInt(numVal.Int)