You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: operator_test.go
    path of file: ./repos/chai/internal/stream
    
    the code of the file until where you have to start completion: package stream_test

import (
	"encoding/json"
	"fmt"
	"strconv"
	"testing"

	"github.com/chaisql/chai/internal/database"
	"github.com/chaisql/chai/internal/environment"
	"github.com/chais
    
func TestTableDelete(t *testing.T) {
	tests := []struct {
		name     string
		a        []int
		op       stream.Operator
		expected testutil.Rows
		fails    bool
	}{
		{
			"doc with key",
			[]int{1, 2, 3},
			rows.Filter(testutil.ParseExpr(t, `a > 1`)),
			testutil.MakeRows(t, `{"a": 1}`),
			false,
		},
	}

	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			db, tx, cleanup := testutil.NewTestTx(t)
			defer cleanup()

			testutil.MustExec(t, db, tx, "CREATE TABLE test (a INTEGER PRIMARY KEY)")

			for _, a := range test.a {
				testutil.MustExec(t, db, tx, "INSERT INTO test VALUES (?)", environment.Param{Value: a})
			}

			var env environment.Environment
			env.Tx = tx

			s := stream.New(table.Scan("test")).Pipe(test.op).Pipe(table.Delete("test"))

			err := s.Iterate(&env, func(out *environment.Environment) error {
				return nil
			})
			if test.fails {
				require.Error(t, err)
			} else {
				require.NoError(t, err)
			}

			res := testutil.MustQuery(t, db, tx, "SELECT * FROM test")
			defer res.Close()

			var got []row.Row
			err = res.Iterate(func(r database.Row) error {
				var fb row.ColumnBuffer
				fb.Copy(r)
				got = append(got, &fb)
				return nil
			})
			require.NoError(t, err)
			test.expected.RequireEqual(t, got)
		})
	}

	t.Run("String", func(t *testing.T) {
		require.Equal(t, table.Delete("test").String(), "table.Delete('test')")
	})
}