code: func (t *transpilerState) mapFields(in cursor) (cursor, error) {
  	columns := t.stmt.ColumnNames()
  	if len(columns) != len(t.stmt.Fields) {
  		// TODO(jsternberg): This scenario should not be possible. Replace the use of ColumnNames with a more
  		// statically verifiable list of columns when we process the fields from the select statement instead
  		// of doing this in the future.
  		panic("number of columns does not match the number of fields")
  	}
  
  	properties := make([]*semantic.Property, 0, len(t.stmt.Fields)+1)
  	properties = append(properties, &semantic.Property{
  		Key: &semantic.Identifier{Name: execute.DefaultTimeColLabel},
  		Value: &semantic.MemberExpression{
  			Object: &semantic.IdentifierExpression{
  				Name: "r",
  			},
  			Property: execute.DefaultTimeColLabel,
  		},
  	})
  	for i, f := range t.stmt.Fields {
  		if ref, ok := f.Expr.(*influxql.VarRef); ok && ref.Val == "time" {
  			// Skip past any time columns.
  			continue
  		}
  		value, err := t.mapField(f.Expr, in)
  		if err != nil {
  			return nil, err
  		}
  		properties = append(properties, &semantic.Property{
  			Key:   &semantic.Identifier{Name: columns[i]},
  			Value: value,
  		})
  	}
  	id := t.op("map", &transformations.MapOpSpec{
  		Fn: &semantic.FunctionExpression{
  			Block: &semantic.FunctionBlock{
  				Parameters: &semantic.FunctionParameters{
  					List: []*semantic.FunctionParameter{{
  						Key: &semantic.Identifier{Name: "r"},
  					}},
  				},
  				Body: &semantic.ObjectExpression{
  					Properties: properties,
  				},
  			},
  		},
  		MergeKey: true,
  	}, in.ID())
  	return &mapCursor{id: id}, nil
  }
docs: // mapFields will take the list of symbols and maps each of the operations
  // using the column names.