According to the document about Bit functions,
"Bit functions work for any pair of types from UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64, Float32, or Float64"
CREATE TABLE bit_func(c1 UInt8, c2 UInt32) ENGINE = Memory
INSERT INTO bit_func (c1, c2) VALUES (3, 4);
<<case one: if I cast both to uin8, it works OK>>
SELECT c1, c2 FROM bit_func WHERE bitAnd(toUInt8(c2), toUInt8(4));
┌─c1─┬─c2─┐
│ 3 │ 4 │
└────┴────┘
<<case two: if I case the second argument to UInt32, it does not work>>
SELECT c1, c2 FROM bit_func WHERE bitAnd(c2, toUInt32(4));
Received exception from server:
Code: 59. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Illegal type ColumnVector<UInt32> of column for filter. Must be ColumnUInt8 or ColumnConstUInt8 or Nullable variants of them..
This is not according to the document cited above. Or, did I do anything incorrect here?
Thanks