code: func (db *DB) Querier(mint, maxt int64) (Querier, error) {
  	var blocks []BlockReader
  	var blockMetas []BlockMeta
  
  	db.mtx.RLock()
  	defer db.mtx.RUnlock()
  
  	for _, b := range db.blocks {
  		if b.OverlapsClosedInterval(mint, maxt) {
  			blocks = append(blocks, b)
  			blockMetas = append(blockMetas, b.Meta())
  		}
  	}
  	if maxt >= db.head.MinTime() {
  		blocks = append(blocks, &rangeHead{
  			head: db.head,
  			mint: mint,
  			maxt: maxt,
  		})
  	}
  
  	blockQueriers := make([]Querier, 0, len(blocks))
  	for _, b := range blocks {
  		q, err := NewBlockQuerier(b, mint, maxt)
  		if err == nil {
  			blockQueriers = append(blockQueriers, q)
  			continue
  		}
  		// If we fail, all previously opened queriers must be closed.
  		for _, q := range blockQueriers {
  			q.Close()
  		}
  		return nil, errors.Wrapf(err, "open querier for block %s", b)
  	}
  
  	if len(OverlappingBlocks(blockMetas)) > 0 {
  		return &verticalQuerier{
  			querier: querier{
  				blocks: blockQueriers,
  			},
  		}, nil
  	}
  
  	return &querier{
  		blocks: blockQueriers,
  	}, nil
  }
docs: // Querier returns a new querier over the data partition for the given time range.
  // A goroutine must not handle more than one open Querier.