bitmap_has_all

description

Syntax

BOOLEAN BITMAP_HAS_ALL(BITMAP lhs, BITMAP rhs)

如果第一个bitmap包含第二个bitmap的全部元素,则返回true。 如果第二个bitmap包含的元素为空,返回true。

example

  1. mysql> select bitmap_has_all(bitmap_from_string("0, 1, 2"), bitmap_from_string("1, 2"));
  2. +---------------------------------------------------------------------------+
  3. | bitmap_has_all(bitmap_from_string('0, 1, 2'), bitmap_from_string('1, 2')) |
  4. +---------------------------------------------------------------------------+
  5. | 1 |
  6. +---------------------------------------------------------------------------+
  7. mysql> select bitmap_has_all(bitmap_empty(), bitmap_from_string("1, 2"));
  8. +------------------------------------------------------------+
  9. | bitmap_has_all(bitmap_empty(), bitmap_from_string('1, 2')) |
  10. +------------------------------------------------------------+
  11. | 0 |
  12. +------------------------------------------------------------+

keywords

  1. BITMAP_HAS_ALL,BITMAP