@ScalarOperator(MODULUS)
    @SqlType(StandardTypes.TINYINT)
    public static long modulus(@SqlType(StandardTypes.TINYINT) long left, @SqlType(StandardTypes.TINYINT) long right)
    {
        try {
            return left % right;
        }
        catch (ArithmeticException e) {
            throw new PrestoException(DIVISION_BY_ZERO, e);
        }
    }
@Test
    public void testModulus()
    {
        assertFunction("TINYINT'37' % TINYINT'37'", TINYINT, (byte) 0);
        assertFunction("TINYINT'37' % TINYINT'17'", TINYINT, (byte) (37 % 17));
        assertFunction("TINYINT'17' % TINYINT'37'", TINYINT, (byte) (17 % 37));
        assertFunction("TINYINT'17' % TINYINT'17'", TINYINT, (byte) 0);
        assertInvalidFunction("TINYINT'17' % TINYINT'0'", DIVISION_BY_ZERO);
    }