
create table test1 (a Float32,  b Float32 ) engine = MergeTree order by a ;
insert into test1 values (0.1,0.1), (0.2,0.2);
select count() from test1 where b = 0.1;
0 
select count() from test1 where b = toFloat32(0.1);
1
select count() from test1 where a > 0;
0
select count() from test1 where a > 0.0;
2
select count() from test1 where b > 0;
2

version 22.1.3.7  

{
    if (!key_columns.count(column))
        return false;
    rpn.emplace_back(RPNElement::FUNCTION_IN_RANGE, key_columns[column], range);
    rpn.emplace_back(RPNElement::FUNCTION_AND);
    return true;
}
/** Computes value of constant expression and its data type.
  * Returns false, if expression isn't constant.
  */
bool KeyCondition::getConstant(const ASTPtr & expr, Block & block_with_constants, Field & out_value, DataTypePtr & out_type)
{
    
    String column_name = expr->getColumnName();
    if (const auto * lit = expr->as<ASTLiteral>())
    {
        
        
        
        if (!block_with_constants.has(column_name))
            column_name = "_dummy";
        
        out_value = lit->value;
        out_type = block_with_constants.getByName(column_name).type;