Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cli/outputflags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type Flags struct {
forceBinary bool
jsonPretty bool
jsonShortcut bool
noHeader bool
outputFile string
pretty int
split string
Expand Down
11 changes: 0 additions & 11 deletions compiler/rungen/op.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions compiler/rungen/vop.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 0 additions & 7 deletions compiler/semantic/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 0 additions & 12 deletions compiler/semantic/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package semantic

import (
"errors"
"strings"

"github.com/brimdata/super"
"github.com/brimdata/super/compiler/ast"
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions runtime/sam/expr/agg/fuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions runtime/sam/expr/cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
12 changes: 0 additions & 12 deletions runtime/vam/expr/cast/number.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 3 additions & 5 deletions runtime/vam/expr/mapcall.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
24 changes: 0 additions & 24 deletions sio/dbio/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
5 changes: 2 additions & 3 deletions sio/parquetio/vectorreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 0 additions & 24 deletions sup/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
19 changes: 0 additions & 19 deletions sup/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion vector/record.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down