Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(query): enable the schema mutation optimizations #19327

Closed
wants to merge 1 commit into from
Closed
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
7 changes: 0 additions & 7 deletions flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@
contact: Query Team
lifetime: temporary

- name: Memory Optimized Schema Mutation
description: Enable the memory optimized schema mutation functions
key: memoryOptimizedSchemaMutation
default: false
contact: Query Team
lifetime: temporary

- name: Simple Task Options Extraction
description: Simplified task options extraction to avoid undefined functions when saving tasks
key: simpleTaskOptionsExtraction
Expand Down
16 changes: 0 additions & 16 deletions kit/feature/list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions query/stdlib/influxdata/influxdb/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func init() {
GroupWindowAggregateTransposeRule{},
PushDownGroupAggregateRule{},
SwitchFillImplRule{},
SwitchSchemaMutationImplRule{},
)
plan.RegisterLogicalRules(
MergeFiltersRule{},
Expand Down Expand Up @@ -1157,26 +1156,6 @@ func (r SwitchFillImplRule) Rewrite(ctx context.Context, pn plan.Node) (plan.Nod
return pn, false, nil
}

type SwitchSchemaMutationImplRule struct{}

func (SwitchSchemaMutationImplRule) Name() string {
return "SwitchSchemaMutationImplRule"
}

func (SwitchSchemaMutationImplRule) Pattern() plan.Pattern {
return plan.Pat(universe.SchemaMutationKind, plan.Any())
}

func (r SwitchSchemaMutationImplRule) Rewrite(ctx context.Context, pn plan.Node) (plan.Node, bool, error) {
spec, ok := pn.ProcedureSpec().(*universe.DualImplProcedureSpec)
if !ok || spec.UseDeprecated {
return pn, false, nil
}

spec.UseDeprecated = !feature.MemoryOptimizedSchemaMutation().Enabled(ctx)
return pn, spec.UseDeprecated, nil
}

func asSchemaMutationProcedureSpec(spec plan.ProcedureSpec) *universe.SchemaMutationProcedureSpec {
if s, ok := spec.(*universe.DualImplProcedureSpec); ok {
spec = s.ProcedureSpec
Expand Down