revert(flux): Revert incompatible commit 6f805cb
parent
39ab4a10c5
commit
3633a974b6
|
@ -149,15 +149,6 @@ func (b ProxyQueryServiceAsyncBridge) Query(ctx context.Context, w io.Writer, re
|
|||
if err != nil {
|
||||
return stats, tracing.LogError(span, err)
|
||||
}
|
||||
|
||||
if results, err := q.ProfilerResults(); err != nil {
|
||||
return stats, tracing.LogError(span, err)
|
||||
} else if results != nil {
|
||||
_, err = encoder.Encode(w, results)
|
||||
if err != nil {
|
||||
return stats, tracing.LogError(span, err)
|
||||
}
|
||||
}
|
||||
return stats, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ import (
|
|||
|
||||
"github.com/influxdata/flux"
|
||||
"github.com/influxdata/flux/codes"
|
||||
"github.com/influxdata/flux/execute/table"
|
||||
"github.com/influxdata/flux/lang"
|
||||
"github.com/influxdata/flux/memory"
|
||||
"github.com/influxdata/influxdb/v2"
|
||||
|
@ -548,23 +547,6 @@ type Query struct {
|
|||
alloc *memory.Allocator
|
||||
}
|
||||
|
||||
func (q *Query) ProfilerResults() (flux.ResultIterator, error) {
|
||||
p := q.program.(*lang.AstProgram)
|
||||
if len(p.Profilers) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
tables := make([]flux.Table, 0)
|
||||
for _, profiler := range p.Profilers {
|
||||
if result, err := profiler.GetResult(q, q.alloc); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
tables = append(tables, result)
|
||||
}
|
||||
}
|
||||
res := table.NewProfilerResult(tables...)
|
||||
return flux.NewSliceResultIterator([]flux.Result{&res}), nil
|
||||
}
|
||||
|
||||
// ID reports an ephemeral unique ID for the query.
|
||||
func (q *Query) ID() QueryID {
|
||||
return q.id
|
||||
|
|
Loading…
Reference in New Issue