Skip to content

Commit

Permalink
Revert Tuple2 change
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonkers committed Jan 7, 2025
1 parent 277a4aa commit 4cd4d3c
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions lib/column/tuple.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 4cd4d3c

Please sign in to comment.