private def tag()

in atlas-core/src/main/scala/com/netflix/atlas/core/index/RoaringTagIndex.scala [186:211]


  private def tag(k: Int, v: Int): Long = (k.toLong << 32) | v.toLong

  /** Extract the key for an encoded tag. */
  private def tagKey(t: Long): Int = (t >> 32).toInt

  /** Extract the value for an encoded tag. */
  private def tagValue(t: Long): Int = (t & 0x00000000FFFFFFFFL).toInt

  private[index] def findImpl(query: Query, offset: Int): RoaringBitmap = {
    import com.netflix.atlas.core.model.Query.*
    query match {
      case And(q1, q2)            => and(q1, q2, offset)
      case Or(q1, q2)             => or(q1, q2, offset)
      case Not(q)                 => diff(all, findImpl(q, offset))
      case Equal(k, v)            => equal(k, v, offset)
      case GreaterThan(k, v)      => greaterThan(k, v, false, offset)
      case GreaterThanEqual(k, v) => greaterThan(k, v, true, offset)
      case LessThan(k, v)         => lessThan(k, v, false, offset)
      case LessThanEqual(k, v)    => lessThan(k, v, true, offset)
      case In(k, vs)              => in(k, vs, offset)
      case q: PatternQuery        => strPattern(q, offset)
      case HasKey(k)              => hasKey(k, offset)
      case True                   => withOffset(all.clone(), offset)
      case False                  => new RoaringBitmap()
    }
  }