@ScalarOperator(CAST)
    @SqlType(StandardTypes.BOOLEAN)
    public static boolean castToBoolean(@SqlType(StandardTypes.DOUBLE) double value)
    {
        return value != 0;
    }
@Test
    public void testCastToBoolean()
    {
        assertFunction("cast(37.7E0 as boolean)", BOOLEAN, true);
        assertFunction("cast(17.1E0 as boolean)", BOOLEAN, true);
        assertFunction("cast(0.0E0 as boolean)", BOOLEAN, false);
    }