Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thorfour committed May 10, 2024
1 parent 1d21b94 commit 5186926
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions query/physicalplan/physicalplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,43 +254,43 @@ func (p *noopOperator) Draw() *Diagram {
return p.next.Draw()
}

type execOptions struct {
type ExecOptions struct {
orderedAggregations bool
overrideInput []PhysicalPlan
readMode logicalplan.ReadMode
concurrency int
}

func NewExecOptions() execOptions {
return execOptions{
func NewExecOptions() ExecOptions {
return ExecOptions{
concurrency: defaultConcurrency,
}
}

type Option func(o *execOptions)
type Option func(o *ExecOptions)

func WithReadMode(m logicalplan.ReadMode) Option {
return func(o *execOptions) {
return func(o *ExecOptions) {
o.readMode = m
}
}

func WithOrderedAggregations() Option {
return func(o *execOptions) {
return func(o *ExecOptions) {
o.orderedAggregations = true
}
}

// WithOverrideInput can be used to provide an input stage on top of which the
// Build function can build the physical plan.
func WithOverrideInput(input []PhysicalPlan) Option {
return func(o *execOptions) {
return func(o *ExecOptions) {
o.overrideInput = input
}
}

func WithConcurrency(concurrency int) Option {
return func(o *execOptions) {
return func(o *ExecOptions) {
o.concurrency = concurrency
}
}
Expand Down Expand Up @@ -511,7 +511,7 @@ func Build(
}

func shouldPlanOrderedAggregate(
execOpts execOptions, oInfo *planOrderingInfo, agg *logicalplan.Aggregation,
execOpts ExecOptions, oInfo *planOrderingInfo, agg *logicalplan.Aggregation,
) (bool, error) {
if !execOpts.orderedAggregations {
// Ordered aggregations disabled.
Expand Down

0 comments on commit 5186926

Please sign in to comment.