From e5ff860fa092a999e8127fd71adbce48c2a62667 Mon Sep 17 00:00:00 2001 From: colindickson Date: Mon, 7 Aug 2023 09:26:13 -0400 Subject: [PATCH] attempt at numerical null fields as default values --- csvprocessor/writer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/csvprocessor/writer.go b/csvprocessor/writer.go index 7c441f4..2332453 100644 --- a/csvprocessor/writer.go +++ b/csvprocessor/writer.go @@ -252,7 +252,7 @@ func formatField(f interface{}, t schema.FieldType, isArray, isNullable bool) st case schema.FieldTypeBigInt: if f == nil { if isNullable { - return "NULL" + return "0" } return "0" } @@ -263,7 +263,7 @@ func formatField(f interface{}, t schema.FieldType, isArray, isNullable bool) st case schema.FieldTypeBigDecimal: if f == nil { if isNullable { - return "NULL" + return "0" } return "0" } @@ -274,7 +274,7 @@ func formatField(f interface{}, t schema.FieldType, isArray, isNullable bool) st case schema.FieldTypeInt: if f == nil { if isNullable { - return "NULL" + return "0" } return "0" } @@ -297,7 +297,7 @@ func formatField(f interface{}, t schema.FieldType, isArray, isNullable bool) st case schema.FieldTypeBoolean: if f == nil { if isNullable { - return "NULL" + return "false" } return "false" }