From 4cd4d3cfbf150c2347ace35c5b7de0ec3bbae773 Mon Sep 17 00:00:00 2001 From: Miel Donkers Date: Tue, 7 Jan 2025 10:00:54 +0100 Subject: [PATCH] Revert Tuple2 change --- lib/column/tuple.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/lib/column/tuple.go b/lib/column/tuple.go index 68dad31184..95c4e24209 100644 --- a/lib/column/tuple.go +++ b/lib/column/tuple.go @@ -39,10 +39,6 @@ type Tuple struct { index map[string]int // map from col name to offset in columns } -type Tuple2 interface { - Get() (any, any) -} - func (col *Tuple) Reset() { for i := range col.columns { col.columns[i].Reset() @@ -570,23 +566,6 @@ func (col *Tuple) AppendRow(v any) error { return nil } - if tuple2, ok := v.(Tuple2); ok { - if 2 != len(col.columns) { - return &Error{ - ColumnType: string(col.chType), - Err: fmt.Errorf("invalid size. expected %d got %d", len(col.columns), 2), - } - } - elem1, elem2 := tuple2.Get() - if err := col.columns[0].AppendRow(elem1); err != nil { - return err - } - if err := col.columns[1].AppendRow(elem2); err != nil { - return err - } - return nil - } - if valuer, ok := v.(driver.Valuer); ok { val, err := valuer.Value() if err != nil {