Skip to content

Commit 5acf967

Browse files
Mariam-AlmesferMariamalmesfer
authored andcommitted
Add validation test for CurrentTimestamp
1 parent 3934523 commit 5acf967

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

backends-velox/src/test/scala/org/apache/gluten/functions/ScalarFunctionsValidateSuite.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,4 +1521,15 @@ abstract class ScalarFunctionsValidateSuite extends FunctionsValidateSuite {
15211521
}
15221522
}
15231523
}
1524+
test("test_current_timestamp") {
1525+
val df = spark.sql("SELECT l_orderkey, current_timestamp() from lineitem limit 1")
1526+
val optimizedPlan = df.queryExecution.optimizedPlan.toString()
1527+
assert(
1528+
!optimizedPlan.contains("CurrentTimestamp"),
1529+
s"Expected CurrentTimestamp to be folded to a literal, but got: $optimizedPlan"
1530+
)
1531+
checkGlutenPlan[ProjectExecTransformer](df)
1532+
checkFallbackOperators(df, 0)
1533+
df.collect()
1534+
}
15241535
}

0 commit comments

Comments
 (0)