Skip to content

[VL][SPARK-46725] Support dayname function for Spark 4.0+#11549

Closed
yaooqinn wants to merge 2 commits into
apache:mainfrom
yaooqinn:dayname-support
Closed

[VL][SPARK-46725] Support dayname function for Spark 4.0+#11549
yaooqinn wants to merge 2 commits into
apache:mainfrom
yaooqinn:dayname-support

Conversation

@yaooqinn

@yaooqinn yaooqinn commented Feb 3, 2026

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Port Spark's dayname function (SPARK-46725) to Gluten for Spark 4.0 and 4.1.

The dayname function returns the three-letter abbreviated day name (Mon, Tue, Wed, Thu, Fri, Sat, Sun) from a date or timestamp. This function was introduced in Spark 4.0.0.

Changes:

  1. ExpressionNames.scala: Added DAY_NAME constant (dayname)
  2. Spark40Shims.scala / Spark41Shims.scala: Register DayName expression mapping
  3. ExpressionConverter.scala: Modified GetDateField handling to allow DayName to use GenericExpressionTransformer (since it returns String, not integer like other extract functions)
  4. Tests: Added dayname tests in date.sql for both Spark 4.0 and 4.1

How was this patch tested?

  • Added SQL tests in date.sql input/output files for Spark 4.0 and 4.1
  • Enabled date.sql in VeloxSQLQueryTestSettings for both versions

Note

This is a WIP PR. Velox already supports the dayname function in RegisterDatetime.cpp.

@github-actions github-actions Bot added the CORE works for Gluten Core label Feb 3, 2026
@github-actions

github-actions Bot commented Feb 3, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

### What changes were proposed in this pull request?
Port Spark's dayname function (SPARK-46725) to Gluten for Spark 4.0 and 4.1.

The dayname function returns the three-letter abbreviated day name (Mon, Tue, Wed, etc.) from a date or timestamp.

### How was this patch tested?
Added SQL tests in date.sql for both Spark 4.0 and 4.1.
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions Bot added the stale stale label Mar 29, 2026
@github-actions

github-actions Bot commented Apr 9, 2026

Copy link
Copy Markdown

This PR was auto-closed because it has been stalled for 10 days with no activity. Please feel free to reopen if it is still valid. Thanks.

@github-actions github-actions Bot closed this Apr 9, 2026
@yaooqinn yaooqinn deleted the dayname-support branch April 9, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core stale stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant