func (r *RenameFieldRule) FilterKey(key []byte) bool {
	return r.measurementFilter.Filter(key)
}
FilterKey implements Rule interface
package rules
import (
	"fmt"
	"log"
	"github.com/Abc-Arbitrage/infix/logging"
	"github.com/Abc-Arbitrage/infix/filter"
	"github.com/Abc-Arbitrage/infix/storage"
	"github.com/influxdata/influxdb/models"
	"github.com/influxdata/influxdb/tsdb/engine/tsm1"
	"github.com/influxdata/influxql"
)
type fieldRename struct {
	oldKey string
	newKey string
}
type RenameFieldRule struct {
	check bool
	shard storage.ShardInfo
	measurementFilter filter.Filter
	fieldFilter       filter.Filter
	renamed  map[string][]fieldRename
	renameFn RenameFn
	logger *log.Logger
}
type RenameFieldRuleConfig struct {
	Measurement filter.Filter
	Field       filter.Filter
	To          string
}
func NewRenameField(measurementFilter filter.Filter, fieldFilter filter.Filter, renameFn RenameFn) *RenameFieldRule {
	return &RenameFieldRule{
		measurementFilter: filter.NewMeasurementFilter(measurementFilter),
		fieldFilter:       fieldFilter,
		renamed:           make(map[string][]fieldRename),
		renameFn:          renameFn,
		logger:            logging.GetLogger("RenameFieldRule"),
	}
}
func (r *RenameFieldRule) CheckMode(check bool) {
	r.check = check
}
func (r *RenameFieldRule) Flags() int {
	return Standard
}
func (r *RenameFieldRule) WithLogger(logger *log.Logger) {
	r.logger = logger
}