@ScalarOperator(CAST)
    @SqlType(StandardTypes.BOOLEAN)
    public static boolean castToBoolean(@SqlType(StandardTypes.TINYINT) long value)
    {
        return value != 0;
    }
@Test
    public void testCastToBoolean()
    {
        assertFunction("cast(TINYINT'37' as boolean)", BOOLEAN, true);
        assertFunction("cast(TINYINT'17' as boolean)", BOOLEAN, true);
        assertFunction("cast(TINYINT'0' as boolean)", BOOLEAN, false);
    }