@LiteralParameters("x")
    @ScalarOperator(EQUAL)
    @SqlType(StandardTypes.BOOLEAN)
    @SqlNullable
    public static Boolean equal(@SqlType("char(x)") Slice left, @SqlType("char(x)") Slice right)
    {
        return left.equals(right);
    }
@Test
    public void testEqual()
    {
        assertFunction("cast('foo' as char(3)) = cast('foo' as char(5))", BOOLEAN, true);
        assertFunction("cast('foo' as char(3)) = cast('foo' as char(3))", BOOLEAN, true);
        assertFunction("cast('foo' as char(3)) = cast('bar' as char(3))", BOOLEAN, false);
        assertFunction("cast('bar' as char(3)) = cast('foo' as char(3))", BOOLEAN, false);
        assertFunction("cast('bar' as char(5)) = 'bar'", BOOLEAN, true);
        assertFunction("cast('bar' as char(5)) = 'bar   '", BOOLEAN, true);

        assertFunction("cast('a' as char(2)) = cast('a ' as char(2))", BOOLEAN, true);
        assertFunction("cast('a ' as char(2)) = cast('a' as char(2))", BOOLEAN, true);

        assertFunction("cast('a' as char(3)) = cast('a' as char(2))", BOOLEAN, true);
        assertFunction("cast('' as char(3)) = cast('' as char(2))", BOOLEAN, true);
        assertFunction("cast('' as char(2)) = cast('' as char(2))", BOOLEAN, true);
    }