viirya commented on code in PR #3876:
URL: https://github.com/apache/datafusion-comet/pull/3876#discussion_r3029577500


##########
spark/src/test/scala/org/apache/comet/exec/CometWindowExecSuite.scala:
##########
@@ -605,45 +606,47 @@ class CometWindowExecSuite extends CometTestBase {
     }
   }
 
-  // TODO: LAG produces incorrect results
-  ignore("window: LAG with default offset") {
-    withTempDir { dir =>
-      (0 until 30)
-        .map(i => (i % 3, i % 5, i))
-        .toDF("a", "b", "c")
-        .repartition(3)
-        .write
-        .mode("overwrite")
-        .parquet(dir.toString)
-
-      spark.read.parquet(dir.toString).createOrReplaceTempView("window_test")
-      val df = sql("""
-        SELECT a, b, c,
-          LAG(c) OVER (PARTITION BY a ORDER BY b) as lag_c
-        FROM window_test
-      """)
-      checkSparkAnswerAndOperator(df)
+  test("window: LAG with default offset") {
+    
withSQLConf(CometConf.getOperatorAllowIncompatConfigKey(classOf[WindowExec]) -> 
"true") {
+      withTempDir { dir =>
+        (0 until 30)
+          .map(i => (i % 3, i % 5, i))
+          .toDF("a", "b", "c")
+          .repartition(3)
+          .write
+          .mode("overwrite")
+          .parquet(dir.toString)
+
+        spark.read.parquet(dir.toString).createOrReplaceTempView("window_test")
+        val df = sql("""
+          SELECT a, b, c,
+            LAG(c) OVER (PARTITION BY a ORDER BY b, c) as lag_c

Review Comment:
   Added another test with IGNORE NULLs now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to