Skip to content

Commit

Permalink
transform.go: add drop_common_labels() function
Browse files Browse the repository at this point in the history
  • Loading branch information
valyala committed Apr 21, 2022
1 parent 50340b1 commit 2ec871b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion optimizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func getTransformArgIdxForOptimization(funcName string, args []Expr) int {

func isLabelManipulationFunc(funcName string) bool {
switch strings.ToLower(funcName) {
case "alias", "label_copy", "label_del", "label_graphite_group", "label_join", "label_keep", "label_lowercase",
case "alias", "drop_common_labels", "label_copy", "label_del", "label_graphite_group", "label_join", "label_keep", "label_lowercase",
"label_map", "label_match", "label_mismatch", "label_move", "label_replace", "label_set", "label_transform",
"label_uppercase", "label_value":
return true
Expand Down
1 change: 1 addition & 0 deletions transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var transformFuncs = map[string]bool{
"day_of_week": true,
"days_in_month": true,
"deg": true,
"drop_common_labels": true,
"end": true,
"exp": true,
"floor": true,
Expand Down

0 comments on commit 2ec871b

Please sign in to comment.