Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15819#discussion_r88429928
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala
 ---
    @@ -54,6 +61,61 @@ case class InsertIntoHiveTable(
       @transient private lazy val hiveContext = new Context(sc.hiveconf)
       @transient private lazy val catalog = sc.catalog
     
    +  val stagingDir = new HiveConf().getVar(HiveConf.ConfVars.STAGINGDIR)
    +
    +  private def executionId: String = {
    +    val rand: Random = new Random
    +    val format: SimpleDateFormat = new 
SimpleDateFormat("yyyy-MM-dd_HH-mm-ss_SSS")
    +    val executionId: String = "hive_" + format.format(new Date) + "_" + 
Math.abs(rand.nextLong)
    --- End diff --
    
    Why all this -- just us a UUID? you also have a redundant return and types 
here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to