diff --git a/cli/outputflags/flags.go b/cli/outputflags/flags.go index 8fc7912104..cadff39e31 100644 --- a/cli/outputflags/flags.go +++ b/cli/outputflags/flags.go @@ -26,7 +26,6 @@ type Flags struct { forceBinary bool jsonPretty bool jsonShortcut bool - noHeader bool outputFile string pretty int split string diff --git a/compiler/rungen/op.go b/compiler/rungen/op.go index a7a1d5cb4e..f3f02cbe9b 100644 --- a/compiler/rungen/op.go +++ b/compiler/rungen/op.go @@ -408,17 +408,6 @@ func (b *Builder) compileAssignmentsToLvals(assignments []dag.Assignment) ([]*ex return srcs, dsts, nil } -func splitAssignments(assignments []expr.Assignment) ([]*expr.Lval, []expr.Evaluator) { - n := len(assignments) - lhs := make([]*expr.Lval, 0, n) - rhs := make([]expr.Evaluator, 0, n) - for _, a := range assignments { - lhs = append(lhs, a.LHS) - rhs = append(rhs, a.RHS) - } - return lhs, rhs -} - func (b *Builder) compileSeq(seq dag.Seq, parents []sbuf.Puller) ([]sbuf.Puller, error) { for _, o := range seq { var err error diff --git a/compiler/rungen/vop.go b/compiler/rungen/vop.go index 816b8a5c55..4149878833 100644 --- a/compiler/rungen/vop.go +++ b/compiler/rungen/vop.go @@ -99,15 +99,6 @@ func (b *Builder) combineVam(pullers []vector.Puller) vector.Puller { return vamop.NewCombine(b.rctx, pullers) } -func (b *Builder) compileVamScan(scan *dag.SeqScan, parent sbuf.Puller) (vector.Puller, error) { - pool, err := b.lookupPool(scan.Pool) - if err != nil { - return nil, err - } - //XXX check VectorCache not nil - return vamop.NewScanner(b.rctx, b.env.DB().VectorCache(), parent, pool, scan.Fields, nil, nil), nil -} - func (b *Builder) compileVamFork(fork *dag.ForkOp, parent vector.Puller) ([]vector.Puller, error) { var f *vamop.Fork if parent != nil { diff --git a/compiler/semantic/checker.go b/compiler/semantic/checker.go index ff9b59a84a..b7763c4628 100644 --- a/compiler/semantic/checker.go +++ b/compiler/semantic/checker.go @@ -28,13 +28,6 @@ func newChecker(t *translator) *checker { } } -func (c *checker) check(r reporter, seq sem.Seq) { - c.pushErrs() - c.seq(c.unknown, seq) - errs := c.popErrs() - errs.flushErrs(r) -} - func (c *checker) seq(typ super.Type, seq sem.Seq) super.Type { for len(seq) > 0 { if fork, ok := seq[0].(*sem.ForkOp); ok && len(seq) >= 2 { diff --git a/compiler/semantic/evaluator.go b/compiler/semantic/evaluator.go index ef8c048ab5..3a8f03cb24 100644 --- a/compiler/semantic/evaluator.go +++ b/compiler/semantic/evaluator.go @@ -2,7 +2,6 @@ package semantic import ( "errors" - "strings" "github.com/brimdata/super" "github.com/brimdata/super/compiler/ast" @@ -276,17 +275,6 @@ func (e *evaluator) expr(expr sem.Expr) bool { } } -func quotedPath(path []string) string { - if len(path) == 0 { - return "this" - } - var elems []string - for _, s := range path { - elems = append(elems, sup.QuotedName(s)) - } - return strings.Join(elems, ".") -} - func (e *evaluator) arrayElems(elems []sem.ArrayElem) bool { isConst := true for _, elem := range elems { diff --git a/runtime/sam/expr/agg/fuser.go b/runtime/sam/expr/agg/fuser.go index 3f5d93c525..9a5406086d 100644 --- a/runtime/sam/expr/agg/fuser.go +++ b/runtime/sam/expr/agg/fuser.go @@ -12,8 +12,6 @@ type Fuser struct { typ super.Type types map[super.Type]struct{} - - missingFieldsNullable bool } // XXX this is used by type checker but I think we can use the other one diff --git a/runtime/sam/expr/cast.go b/runtime/sam/expr/cast.go index 9b54b9985f..46d7f6338d 100644 --- a/runtime/sam/expr/cast.go +++ b/runtime/sam/expr/cast.go @@ -244,24 +244,6 @@ func (c *casterBytes) Eval(val super.Value) super.Value { return super.NewBytes(val.Bytes()) } -type casterNamedType struct { - sctx *super.Context - expr Evaluator - name string -} - -func (c *casterNamedType) Eval(this super.Value) super.Value { - val := c.expr.Eval(this) - if val.IsError() { - return val - } - typ, err := c.sctx.LookupTypeNamed(c.name, super.TypeUnder(val.Type())) - if err != nil { - return c.sctx.NewError(err) - } - return super.NewValue(typ, val.Bytes()) -} - type casterType struct { sctx *super.Context } diff --git a/runtime/vam/expr/cast/number.go b/runtime/vam/expr/cast/number.go index 1b0cfd3e79..e3efd4b44a 100644 --- a/runtime/vam/expr/cast/number.go +++ b/runtime/vam/expr/cast/number.go @@ -39,18 +39,6 @@ func castToNumber(vec vector.Any, typ super.Type, index []uint32) (vector.Any, [ } } -func inverseIndex(index []uint32, n uint32) []uint32 { - var inverse []uint32 - for i := range n { - if len(index) > 0 && index[0] == i { - index = index[1:] - continue - } - inverse = append(inverse, i) - } - return inverse -} - func toNumeric[T numeric](vec vector.Any, typ super.Type, index []uint32) ([]T, []uint32) { switch vec := vec.(type) { case *vector.Uint: diff --git a/runtime/vam/expr/mapcall.go b/runtime/vam/expr/mapcall.go index d9d8902e56..63ae846de7 100644 --- a/runtime/vam/expr/mapcall.go +++ b/runtime/vam/expr/mapcall.go @@ -2,15 +2,13 @@ package expr import ( "github.com/brimdata/super" - "github.com/brimdata/super/scode" "github.com/brimdata/super/vector" ) type mapCall struct { - sctx *super.Context - builder scode.Builder - expr Evaluator - lambda Evaluator + sctx *super.Context + expr Evaluator + lambda Evaluator } func NewMapCall(sctx *super.Context, e, lambda Evaluator) Evaluator { diff --git a/sio/dbio/writer.go b/sio/dbio/writer.go index b6c3cca513..4d41c9cc8f 100644 --- a/sio/dbio/writer.go +++ b/sio/dbio/writer.go @@ -29,7 +29,6 @@ type Writer struct { sup *sup.Formatter commits table branches map[ksuid.KSUID][]string - rulename string width int colors color.Stack headID ksuid.KSUID @@ -216,26 +215,3 @@ func (t table) formatCommit(b *bytes.Buffer, commit *commits.Commit, branches [] b.WriteString(s) } } - -func (t table) formatActions(b *bytes.Buffer, id ksuid.KSUID) { - for _, action := range t[id] { - switch action := action.(type) { - case *commits.Add: - formatAdd(b, 4, action) - case *commits.Delete: - formatDelete(b, 4, action) - } - } - b.WriteString("\n") -} - -func formatDelete(b *bytes.Buffer, indent int, delete *commits.Delete) { - tab(b, indent) - b.WriteString("Delete ") - b.WriteString(delete.ID.String()) - b.WriteByte('\n') -} - -func formatAdd(b *bytes.Buffer, indent int, add *commits.Add) { - formatDataObject(b, &add.Object, "Add", indent) -} diff --git a/sio/parquetio/vectorreader.go b/sio/parquetio/vectorreader.go index bf442a06be..4af0798220 100644 --- a/sio/parquetio/vectorreader.go +++ b/sio/parquetio/vectorreader.go @@ -24,9 +24,8 @@ import ( ) type VectorReader struct { - ctx context.Context - sctx *super.Context - pushdown sbuf.Pushdown + ctx context.Context + sctx *super.Context fr *pqarrow.FileReader colIndexes []int diff --git a/sup/lexer.go b/sup/lexer.go index 7fcba64e04..fbcbf38d68 100644 --- a/sup/lexer.go +++ b/sup/lexer.go @@ -131,13 +131,6 @@ func (l *Lexer) matchTight(b byte) (bool, error) { return false, nil } -func (l *Lexer) matchBytes(b []byte) (bool, error) { - if err := l.skipSpace(); err != nil { - return false, err - } - return l.matchBytesTight(b) -} - func (l *Lexer) matchBytesTight(b []byte) (bool, error) { n := len(b) if err := l.check(n); err != nil { @@ -150,23 +143,6 @@ func (l *Lexer) matchBytesTight(b []byte) (bool, error) { return ok, nil } -func (l *Lexer) scanTo(b byte) ([]byte, error) { - var out []byte - for { - next, err := l.readByte() - if err != nil { - return nil, err - } - if next == b { - return out, nil - } - out = append(out, next) - if len(out) > MaxSize { - return nil, ErrBufferOverflow - } - } -} - func (l *Lexer) readByte() (byte, error) { if err := l.check(1); err != nil { return 0, err diff --git a/sup/marshal.go b/sup/marshal.go index e83b642021..ebb01c89f1 100644 --- a/sup/marshal.go +++ b/sup/marshal.go @@ -853,25 +853,6 @@ func indirect(v reflect.Value, val super.Value) (BSUPUnmarshaler, reflect.Value) return nil, v } -func (u *UnmarshalBSUPContext) decodeNull(val super.Value, v reflect.Value) error { - inner := v - for inner.Kind() == reflect.Pointer { - if inner.IsNil() { - // Set nil elements so we can find the actual type of the underlying - // value. This is not so we can set the type since the outer value - // will eventually get set to nil- but rather so we can type check - // the null (i.e., you cannot marshal a int64 to null(ip), etc.). - v.Set(reflect.New(v.Type().Elem())) - } - inner = inner.Elem() - } - if err := u.decodeAny(val, inner); err != nil { - return err - } - v.Set(reflect.Zero(v.Type())) - return nil -} - func (u *UnmarshalBSUPContext) decodeNetipAddr(val super.Value, v reflect.Value) error { if super.TypeUnder(val.Type()) != super.TypeIP { return incompatTypeError(val.Type(), v) diff --git a/vector/record.go b/vector/record.go index 6ccbbc0cb5..b8c4f9d880 100644 --- a/vector/record.go +++ b/vector/record.go @@ -197,7 +197,6 @@ func buildTags(nones []uint32, n uint32) ([]uint32, uint32) { // the first, which may be zero when the first value is non-none. type RLE struct { runs []uint32 - running bool prediction uint32 last uint32 }