presto-hive/src/main/java/io/prestosql/plugin/hive/HiveCoercionRecordCursor.java/VarcharToIntegerNumberCoercer/coerce
class VarcharToIntegerNumberCoercer:        @Override
        public void coerce(RecordCursor delegate, int field)
        {
            try {
                long value = Long.parseLong(delegate.getSlice(field).toStringUtf8());
                if (minValue <= value && value <= maxValue) {
                    setLong(value);
                }
                else {
                    setIsNull(true);
                }
            }
            catch (NumberFormatException e) {
                setIsNull(true);
            }
        }