spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dilipbiswal <...@git.apache.org>
Subject [GitHub] spark pull request #21857: [SPARK-21274][SQL] Implement EXCEPT ALL clause.
Date Tue, 24 Jul 2018 14:16:27 GMT
Github user dilipbiswal commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21857#discussion_r204773666
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/generators.scala
---
    @@ -222,6 +222,32 @@ case class Stack(children: Seq[Expression]) extends Generator {
       }
     }
     
    +/**
    + * Replicate the row N times. N is specified as the first argument to the function.
    + * This is a internal function solely used by optimizer to rewrite EXCEPT ALL AND
    + * INTERSECT ALL queries.
    + */
    +case class ReplicateRows(children: Seq[Expression]) extends Generator with CodegenFallback
{
    +  private lazy val numColumns = children.length - 1 // remove the multiplier value from
output.
    +
    +  override def elementSchema: StructType =
    +    StructType(children.tail.zipWithIndex.map {
    +      case (e, index) => StructField(s"col$index", e.dataType)
    +  })
    --- End diff --
    
    @maropu will check and fix.


---

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


Mime
View raw message