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

    https://github.com/apache/spark/pull/9050#discussion_r41831011
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveSparkSubmitSuite.scala ---
    @@ -320,3 +331,36 @@ object SPARK_9757 extends QueryTest {
         }
       }
     }
    +
    +object SPARK_11009 extends QueryTest {
    +  import org.apache.spark.sql.functions._
    +
    +  protected var sqlContext: SQLContext = _
    +
    +  def main(args: Array[String]): Unit = {
    +    Utils.configTestLog4j("INFO")
    +
    +    val sparkContext = new SparkContext(
    +      new SparkConf()
    +        .set("spark.ui.enabled", "false")
    +        .set("spark.sql.shuffle.partitions", "3"))
    +
    +    val hiveContext = new TestHiveContext(sparkContext)
    +    sqlContext = hiveContext
    +
    +    try {
    +      val df = sqlContext.range(1<<20)
    +      val df2 = df.select((df("id") % 1000).alias("A"), (df("id") / 
1000).alias("B"))
    +      val ws = Window.partitionBy(df2("A")).orderBy(df2("B"))
    +      val df3 =
    +        df2
    +          .select(df2("A"), df2("B"), rowNumber().over(ws).alias("rn"))
    +          .filter("rn < 0")
    +      if (df3.rdd.count() == 0) {
    --- End diff --
    
    If failure should only happen for the first time (having the same id both 
in driver and in executor). We can increase the number of partitions to 
increase the change to fail.


---
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