diff --git a/flow/connectors/postgres/qrep_query_executor.go b/flow/connectors/postgres/qrep_query_executor.go index 8c83beeaa5..c7d75c4500 100644 --- a/flow/connectors/postgres/qrep_query_executor.go +++ b/flow/connectors/postgres/qrep_query_executor.go @@ -103,12 +103,12 @@ func (qe *QRepQueryExecutor) fieldDescriptionsToSchema(fds []pgconn.FieldDescrip ctype := postgresOIDToQValueKind(fd.DataTypeOID) if ctype == qvalue.QValueKindInvalid { var err error - ctype = qvalue.QValueKind(qe.customTypeMap[fd.DataTypeOID]) if err != nil { - ctype = qvalue.QValueKindInvalid typeName, ok := qe.customTypeMap[fd.DataTypeOID] if ok { ctype = customTypeToQKind(typeName) + } else { + ctype = qvalue.QValueKindString } } } diff --git a/flow/model/qvalue/avro_converter.go b/flow/model/qvalue/avro_converter.go index 9b8db89d78..52aaa87500 100644 --- a/flow/model/qvalue/avro_converter.go +++ b/flow/model/qvalue/avro_converter.go @@ -1,7 +1,6 @@ package qvalue import ( - "errors" "fmt" "math/big" "time" @@ -123,7 +122,7 @@ func GetAvroSchemaFromQValueKind(kind QValueKind, nullable bool) (*QValueKindAvr AvroLogicalSchema: "string", }, nil default: - return nil, errors.New("unsupported QValueKind type") + return nil, fmt.Errorf("unsupported QValueKind type: %s", kind) } }