(a container)
| 1824 | } |
| 1825 | |
| 1826 | func (rc *runContainer16) and(a container) container { |
| 1827 | if rc.isFull() { |
| 1828 | return a.clone() |
| 1829 | } |
| 1830 | switch c := a.(type) { |
| 1831 | case *runContainer16: |
| 1832 | // Important: there is no reason to believe that the |
| 1833 | // result of intersecting two run containers is itself |
| 1834 | // a run container. Hence we convert to efficient container. |
| 1835 | // We only use run containers when they are efficient. |
| 1836 | return rc.intersect(c).toEfficientContainer() |
| 1837 | case *arrayContainer: |
| 1838 | return rc.andArray(c) |
| 1839 | case *bitmapContainer: |
| 1840 | return rc.andBitmapContainer(c) |
| 1841 | } |
| 1842 | panic("unsupported container type") |
| 1843 | } |
| 1844 | |
| 1845 | func (rc *runContainer16) andCardinality(a container) int { |
| 1846 | switch c := a.(type) { |
no test coverage detected