2019-12-15 06:34:43 +00:00
|
|
|
#include "GatherUtils.h"
|
2019-06-21 15:31:37 +00:00
|
|
|
#include "Selectors.h"
|
|
|
|
#include "Algorithms.h"
|
2018-01-09 15:24:27 +00:00
|
|
|
|
2018-01-10 15:45:05 +00:00
|
|
|
namespace DB::GatherUtils
|
2018-01-09 15:24:27 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
struct ArrayHasSelectArraySourcePair : public ArraySourcePairSelector<ArrayHasSelectArraySourcePair>
|
|
|
|
{
|
|
|
|
template <typename FirstSource, typename SecondSource>
|
|
|
|
static void selectSourcePair(FirstSource && first, SecondSource && second, bool all, ColumnUInt8 & result)
|
|
|
|
{
|
|
|
|
if (all)
|
|
|
|
arrayAllAny<true>(first, second, result);
|
|
|
|
else
|
|
|
|
arrayAllAny<false>(first, second, result);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
void sliceHas(IArraySource & first, IArraySource & second, bool all, ColumnUInt8 & result)
|
|
|
|
{
|
|
|
|
ArrayHasSelectArraySourcePair::select(first, second, all, result);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|