Skip to content

[GLUTEN-1433] [VL] Add validation tests for CurrentTimestamp and now(foldable)#11656

Open
Mariamalmesfer wants to merge 1 commit intoapache:mainfrom
Mariamalmesfer:validate-currenttimestamp
Open

[GLUTEN-1433] [VL] Add validation tests for CurrentTimestamp and now(foldable)#11656
Mariamalmesfer wants to merge 1 commit intoapache:mainfrom
Mariamalmesfer:validate-currenttimestamp

Conversation

@Mariamalmesfer
Copy link
Contributor

@Mariamalmesfer Mariamalmesfer commented Feb 26, 2026

This PR adds validation tests for CurrentTimestamp and now as part of #1433.
CurrentTimestamp and now is a foldable expression and is computed by Spark during query planning.
The added tests verify that:
This confirms that CurrentTimestamp and now is supported on the Velox backend.

Closes part of #1433

@github-actions github-actions bot added the VELOX label Feb 26, 2026
@Mariamalmesfer Mariamalmesfer changed the title This PR adds validation tests for as part of #1433. [VL][1433] Add validation tests for CurrentTimestamp (foldable) Feb 26, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch 2 times, most recently from d50e294 to 7401292 Compare February 26, 2026 02:14
@Mariamalmesfer Mariamalmesfer changed the title [VL][1433] Add validation tests for CurrentTimestamp (foldable) [GLUTEN-1433] [VL] Add validation tests for CurrentTimestamp (foldable) Feb 26, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch 3 times, most recently from a6b9d73 to 0029a43 Compare March 2, 2026 10:21
@Mariamalmesfer Mariamalmesfer marked this pull request as ready for review March 2, 2026 10:23
@Mariamalmesfer Mariamalmesfer marked this pull request as draft March 2, 2026 11:56
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch 5 times, most recently from 983aacb to ae8d6e3 Compare March 3, 2026 01:42
@github-actions github-actions bot added the DOCS label Mar 3, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch 2 times, most recently from 74fd232 to fd6625d Compare March 3, 2026 02:34
@github-actions github-actions bot removed the DOCS label Mar 3, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch from fd6625d to 0e24929 Compare March 3, 2026 10:26
@github-actions github-actions bot added the DOCS label Mar 3, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch from 0e24929 to 3f867f2 Compare March 3, 2026 10:34
@github-actions github-actions bot removed the DOCS label Mar 3, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch from 3f867f2 to d8dfc8e Compare March 3, 2026 11:31
@github-actions github-actions bot added the DOCS label Mar 3, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch from d8dfc8e to 8394158 Compare March 3, 2026 11:34
@github-actions github-actions bot removed the DOCS label Mar 3, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch 3 times, most recently from 129bb79 to 72731c0 Compare March 3, 2026 14:42
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch 20 times, most recently from 5acf967 to 6b55a95 Compare March 8, 2026 12:34
@Mariamalmesfer Mariamalmesfer marked this pull request as ready for review March 8, 2026 12:39
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch from 6b55a95 to c7bcddc Compare March 11, 2026 16:08
@Mariamalmesfer Mariamalmesfer changed the title [GLUTEN-1433] [VL] Add validation tests for CurrentTimestamp (foldable) [GLUTEN-1433] [VL] Add validation tests for CurrentTimestamp and now(foldable) Mar 12, 2026
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch 2 times, most recently from d0a9fb0 to 498dfa3 Compare March 12, 2026 11:34
@zhouyuan zhouyuan requested a review from rui-mo March 13, 2026 10:29
@Mariamalmesfer Mariamalmesfer force-pushed the validate-currenttimestamp branch from 498dfa3 to 2f8ee40 Compare March 15, 2026 17:12
Copy link
Contributor

@rui-mo rui-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

val optimizedPlan = df.queryExecution.optimizedPlan.toString()
assert(
!optimizedPlan.contains("CurrentTimestamp"),
s"Expected CurrentTimestamp to be folded to a literal, but got: $optimizedPlan"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excluding the org.apache.spark.sql.catalyst.optimizer.ConstantFolding rule via configuring spark.sql.optimizer.excludedRules might could help verify whether this function can be offloaded to native computing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants