title: Hive auto increment
body: <p>I want to create an auto_increment column in Hive. 
  I didn't see anything on the hive doc about that but I found that we can used :
  UDFRowSequence to make that.</p>
  
  <p>Is there the most recent way to do that or is there a new way, most "easier" ?</p>
  
  <p>I already tried it : so in my Java project, I had created the function like that :</p>
  
  <pre><code>private static void createAutoIncrFunction() throws SQLException {
      Statement stmt = conn.createStatement();
      String sql = "create function autoincr as \"org.apache.hadoop.hive.contrib.udf.UDFRowSequence\"";
      stmt.execute(sql);
  }
  </code></pre>
  
  <p>The creation of the function is working.
  But now I don't how to create my table with this function I tried : </p>
  
  <pre><code>private static void createTableLine() throws SQLException {
      String sql =  "CREATE TABLE IF NOT EXISTS line(id_line INT autoincr(), "
                                                  + "uid_ticket VARCHAR(64), "
                                                  + "number INT, "
                                                  + "kind INT)";
      Statement stmt = conn.createStatement();
      stmt.execute(sql);
  }
  </code></pre>
  
  <p>But It's not working, so my question is: how can I create a table with an auto_increment column and how can I insert data in it ? </p>