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

    https://github.com/apache/spark/pull/9050#discussion_r41826342
  
    --- 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.count() == 0) {
    --- End diff --
    
    ah, sorry. Actually, can we do `df3.rdd.count()` to make sure we do 
materialize all results? 


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to