Skip to content

[VL] Enable native Window execution for TIMESTAMP_NTZ - #13050

Open
Mariamalmesfer wants to merge 1 commit into
apache:mainfrom
Mariamalmesfer:ts-ntz-window-partition-order-support
Open

Mariamalmesfer wants to merge 1 commit into
apache:mainfrom
Mariamalmesfer:ts-ntz-window-partition-order-support

Conversation

@Mariamalmesfer

@Mariamalmesfer Mariamalmesfer commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Enables native Window execution for TIMESTAMP_NTZ. Velox already supports the required comparison and sorting behavior, so the gap was on the Gluten side, in Validators.scala.
This PR adds support for TIMESTAMP_NTZ in:

  • partition and order-by keys
  • lag
  • lead
  • first_value
  • last_value
  • nth_value
  • count
  • min
  • max

Also updates SortExec and ShuffleExchangeExec validation for bare NTZ keys. Added validator unit tests and integration test coverage, including multiple shuffle partitions, repeated and NULL keys, microsecond precision and pre-epoch timestamps. Updated the shared Delta test based on backend NTZ support.

@github-actions github-actions Bot added CORE works for Gluten Core VELOX labels Sep 17, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from ce2583f to 8d0ad7a Compare September 17, 2026 23:30
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 8d0ad7a to b1eb13d Compare September 20, 2026 15:20
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from b1eb13d to f692423 Compare September 20, 2026 17:30
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer Mariamalmesfer changed the title [VL] Enable native Window execution for TIMESTAMP_NTZ partition/order-by keys [VL] Enable native Window execution for TIMESTAMP_NTZ Sep 21, 2026
@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from f692423 to 8ea8bef Compare September 21, 2026 10:05
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer marked this pull request as ready for review September 21, 2026 13:06
@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 8ea8bef to 509ada7 Compare September 21, 2026 18:24
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 509ada7 to 63de393 Compare September 30, 2026 12:15
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@zhouyuan zhouyuan self-assigned this Oct 5, 2026
@zhouyuan
zhouyuan requested a balanced review from Copilot October 9, 2026 14:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

3 open findings
What changed in this PR

Enables native execution for TIMESTAMP_NTZ when used as Window partition/order-by keys by expanding Validators.scala whitelisting and updating/adding regression tests.

Changes:

  • Extend NTZ validation to allow Window plans where NTZ appears in partition/order keys (via updated SortExec / ShuffleExchangeExec handling) and add explicit WindowExec validation.
  • Update an existing Delta test to no longer expect fallback for NTZ partition columns.
  • Add Velox window validation tests covering NTZ in partition/order keys and several NTZ-typed window-function arguments.
File Description
gluten-substrait/​src/​main/​scala/​org/​apache/​gluten/​extension/​columnar/​validator/​Validators.scala Expands NTZ plan whitelisting to include WindowExec and constrains Sort/Shuffle NTZ handling to “bare attribute” keys.
gluten-delta/​src/​test/​scala/​org/​apache/​gluten/​execution/​DeltaSuite.scala Updates the NTZ partition-column test to no longer require fallback.
backends-velox/​src/​test/​scala/​org/​apache/​gluten/​functions/​WindowFunctionsValidateSuite.scala Adds test coverage for NTZ window partition/order keys and several NTZ window-function argument cases.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 5db0bc4 to fa24d8f Compare October 11, 2026 22:45
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from fa24d8f to 0d292f0 Compare October 11, 2026 23:37
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 0d292f0 to b0b235c Compare October 12, 2026 10:26
@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from b0b235c to 1e1f06e Compare October 12, 2026 13:29
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 1e1f06e to 2a070be Compare October 13, 2026 08:16
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 2a070be to fd183bf Compare October 13, 2026 10:18
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from fd183bf to 61cf6f5 Compare November 1, 2026 23:28
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 61cf6f5 to c498ece Compare November 3, 2026 11:42
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from c498ece to ccccf73 Compare November 9, 2026 19:32
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from ccccf73 to f249921 Compare November 16, 2026 11:23
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The added window tests use only integer partition keys and a single shuffle partition, leaving the newly enabled NTZ partition-key path and multi-partition hashing untested.

1 open issue
3 resolved since last review

Review effort: Balanced

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch 2 times, most recently from 58698ec to 2ed0bc6 Compare November 24, 2026 11:39
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 2ed0bc6 to 84016b6 Compare November 24, 2026 12:58
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 84016b6 to 66027a9 Compare November 24, 2026 13:14
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@Mariamalmesfer
Mariamalmesfer force-pushed the ts-ntz-window-partition-order-support branch from 66027a9 to bd92c9b Compare November 29, 2026 12:27
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

This branch has not been deployed

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

Labels

CORE works for Gluten Core DATA_LAKE VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants