Skip to content

Commit

Permalink
Remove unused SelectedTagMap.
Browse files Browse the repository at this point in the history
  • Loading branch information
toddboom committed May 20, 2015
1 parent 434f0af commit f15e509
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
15 changes: 7 additions & 8 deletions influxql/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ type Tx interface {
type MapReduceJob struct {
MeasurementName string
TagSet *TagSet
SelectedTagMap map[string]string // map of the tags in the select statement
Mappers []Mapper // the mappers to hit all shards for this MRJob
TMin int64 // minimum time specified in the query
TMax int64 // maximum time specified in the query
key []byte // a key that identifies the MRJob so it can be sorted
interval int64 // the group by interval of the query
stmt *SelectStatement // the select statement this job was created for
chunkSize int // the number of points to buffer in raw queries before returning a chunked response
Mappers []Mapper // the mappers to hit all shards for this MRJob
TMin int64 // minimum time specified in the query
TMax int64 // maximum time specified in the query
key []byte // a key that identifies the MRJob so it can be sorted
interval int64 // the group by interval of the query
stmt *SelectStatement // the select statement this job was created for
chunkSize int // the number of points to buffer in raw queries before returning a chunked response
}

func (m *MapReduceJob) Open() error {
Expand Down
12 changes: 0 additions & 12 deletions tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,29 +148,17 @@ func (tx *tx) CreateMapReduceJobs(stmt *influxql.SelectStatement, tagKeys []stri
interval = d.Nanoseconds()
}

selectedTagSets, err := m.tagSets(stmt, selectTags)
if err != nil {
return nil, err
}

// get the sorted unique tag sets for this query.
tagSets, err := m.tagSets(stmt, tagKeys)
if err != nil {
return nil, err
}

var selectedTagMap map[string]string

if len(selectedTagSets) > 0 {
selectedTagMap = selectedTagSets[0].Tags
}

for _, t := range tagSets {
// make a job for each tagset
job := &influxql.MapReduceJob{
MeasurementName: m.Name,
TagSet: t,
SelectedTagMap: selectedTagMap,
TMin: tmin.UnixNano(),
TMax: tmax.UnixNano(),
}
Expand Down

0 comments on commit f15e509

Please sign in to comment.