mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-13 03:10:03 -05:00
Merge pull request #1536 from alrs/doltcore-table-errs
libraries/doltcore/tables: fix two subpackage dropped errors
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user