### Question:
SmallintOperators { @ScalarOperator(CAST) @SqlType(StandardTypes.BOOLEAN) public static boolean castToBoolean(@SqlType(StandardTypes.SMALLINT) long value) { return value != 0; } private  SmallintOperators(); @ScalarOperator(ADD) @SqlType(StandardTypes.SMALLINT) static long add(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(SUBTRACT) @SqlType(StandardTypes.SMALLINT) static long subtract(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(MULTIPLY) @SqlType(StandardTypes.SMALLINT) static long multiply(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(DIVIDE) @SqlType(StandardTypes.SMALLINT) static long divide(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(MODULUS) @SqlType(StandardTypes.SMALLINT) static long modulus(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right); @ScalarOperator(NEGATION) @SqlType(StandardTypes.SMALLINT) static long negate(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.BIGINT) static long castToBigint(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.INTEGER) static long castToInteger(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.TINYINT) static long castToTinyint(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.BOOLEAN) static boolean castToBoolean(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.DOUBLE) static double castToDouble(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @SqlType(StandardTypes.REAL) static long castToReal(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(CAST) @LiteralParameters("x") @SqlType("varchar(x)") static Slice castToVarchar(@SqlType(StandardTypes.SMALLINT) long value); @ScalarOperator(SATURATED_FLOOR_CAST) @SqlType(StandardTypes.TINYINT) static long saturatedFloorCastToTinyint(@SqlType(StandardTypes.SMALLINT) long value);  }### Answer:
@Test public void testCastToBoolean() { assertFunction("cast(SMALLINT'37' as boolean)", BOOLEAN, true); assertFunction("cast(SMALLINT'17' as boolean)", BOOLEAN, true); assertFunction("cast(SMALLINT'0' as boolean)", BOOLEAN, false); }