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

    https://github.com/apache/spark/pull/21854#discussion_r204622410
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
 ---
    @@ -1392,3 +1394,17 @@ object UpdateNullabilityInAttributeReferences 
extends Rule[LogicalPlan] {
           }
       }
     }
    +
    +/**
    + * Set the seed for random number generation in Uuid expressions for 
streaming query.
    + */
    +object ResolvedUuidExpressionsForStreaming extends Rule[LogicalPlan] {
    +  private lazy val random = new Random()
    +
    +  override def apply(plan: LogicalPlan): LogicalPlan = plan.transformUp {
    +    case p => p transformExpressionsUp {
    +      case Uuid(_) if p.isStreaming => Uuid(Some(random.nextLong()))
    --- End diff --
    
    not a big deal at all but can we remove `(_)` like _: Uuid ?


---

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

Reply via email to