From 3fc07732249e8174fb7d505f3d62f7dde8ef027f Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Mon, 12 Apr 2021 03:04:47 -0700 Subject: [PATCH 1/2] libraries/doltcore/table/editor: fix dropped error --- go/libraries/doltcore/table/editor/pk_table_editor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go/libraries/doltcore/table/editor/pk_table_editor.go b/go/libraries/doltcore/table/editor/pk_table_editor.go index 8c83605dc7..cdd49653d0 100644 --- a/go/libraries/doltcore/table/editor/pk_table_editor.go +++ b/go/libraries/doltcore/table/editor/pk_table_editor.go @@ -307,6 +307,10 @@ func GetIndexedRows(ctx context.Context, te TableEditor, key types.Tuple, indexN } tableRow, err := row.FromNoms(te.Schema(), pkTupleVal.(types.Tuple), fieldsVal.(types.Tuple)) + if err != nil { + return nil, err + } + rows = append(rows, tableRow) } From 5533613c02a4ab7031ee8382604989ff07a035b5 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Mon, 12 Apr 2021 03:08:38 -0700 Subject: [PATCH 2/2] libraries/doltcore/table/typed/json: fix dropped error --- go/libraries/doltcore/table/typed/json/writer.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/go/libraries/doltcore/table/typed/json/writer.go b/go/libraries/doltcore/table/typed/json/writer.go index d7bb98a51d..34c2a1ecdf 100644 --- a/go/libraries/doltcore/table/typed/json/writer.go +++ b/go/libraries/doltcore/table/typed/json/writer.go @@ -77,7 +77,7 @@ func (jsonw *JSONWriter) GetSchema() schema.Schema { func (jsonw *JSONWriter) WriteRow(ctx context.Context, r row.Row) error { allCols := jsonw.sch.GetAllCols() colValMap := make(map[string]interface{}, allCols.Size()) - err := allCols.Iter(func(tag uint64, col schema.Column) (stop bool, err error) { + if err := allCols.Iter(func(tag uint64, col schema.Column) (stop bool, err error) { val, ok := r.GetColVal(tag) if !ok || types.IsNull(val) { return false, nil @@ -112,7 +112,9 @@ func (jsonw *JSONWriter) WriteRow(ctx context.Context, r row.Row) error { colValMap[col.Name] = val return false, nil - }) + }); err != nil { + return err + } data, err := marshalToJson(colValMap) if err != nil {