Skip to content

Commit

Permalink
fix(ds.set_body): don't assign schemas when using set_body
Browse files Browse the repository at this point in the history
ds.set_body is currently always assigning ds.Structure whenever it's called, which is trampling schemas. instead set_body should _never_ set a schema.
  • Loading branch information
b5 committed Mar 5, 2019
1 parent 9f06ef9 commit df4742b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions ds/dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,6 @@ func (d *Dataset) SetBody(thread *starlark.Thread, _ *starlark.Builtin, args sta
Schema: sch,
}

if d.ds.Structure == nil {
d.ds.Structure = st
}
w, err := dsio.NewEntryBuffer(st)
if err != nil {
return starlark.None, err
Expand Down
2 changes: 0 additions & 2 deletions transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ func ExecScript(ds *dataset.Dataset, opts ...func(o *ExecOpts)) error {
tr := io.TeeReader(script, buf)
pipeScript := qfs.NewMemfileReader(script.FileName(), tr)

// buffer for script output

t := &transform{
node: o.Node,
ds: ds,
Expand Down

0 comments on commit df4742b

Please sign in to comment.