presto-main/src/main/java/io/prestosql/sql/relational/SqlToRowExpressionTranslator.java/SqlToRowExpressionTranslator/visitLongLiteral
class SqlToRowExpressionTranslator:        @Override
        protected RowExpression visitLongLiteral(LongLiteral node, Void context)
        {
            if (node.getValue() >= Integer.MIN_VALUE && node.getValue() <= Integer.MAX_VALUE) {
                return constant(node.getValue(), INTEGER);
            }
            return constant(node.getValue(), BIGINT);
        }