Skip to content

feat: Implement TimeType support - Infrastructure - shuffle#4398

Open
YutaLin wants to merge 10 commits into
apache:mainfrom
YutaLin:4288/Shuffle
Open

feat: Implement TimeType support - Infrastructure - shuffle#4398
YutaLin wants to merge 10 commits into
apache:mainfrom
YutaLin:4288/Shuffle

Conversation

@YutaLin

@YutaLin YutaLin commented May 22, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #4396.

Rationale for this change

Support shuffle for TimeType, include native and JVM columnar

What changes are included in this PR?

  • Add TimeType supported in CometShuffleExchangeExec.scala, so the planner will offload a shuffle carrying a TimeType column instead of fallback
  • Add Time64(Nanosecond) arms to the hasher, hasing as i64, in hash_funcs/utils.rs
  • Add Time64(Nanosecond) handling at UnsafeRow -> Arrow Dispatch sites in spark_unsafe/row.rs, spark_unsafe/list.rs
  • Add shuffle_time.sql for test shuffle only(no aggregate)

How are these changes tested?

run sql test in spark4.1, spark4.2

@YutaLin

YutaLin commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Hi @parthchandra
Could you help me review this? Thanks

Comment thread native/shuffle/src/spark_unsafe/list.rs
@andygrove

Copy link
Copy Markdown
Member

Hi @YutaLin - could you address feedback and fix conflicts? I took a pass through and this is looking good.

@andygrove andygrove marked this pull request as draft June 25, 2026 16:25
@andygrove

Copy link
Copy Markdown
Member

Moving this to draft for now. @YutaLin feel free to mark as ready-for-review once you have time to address feedback.

@YutaLin YutaLin marked this pull request as ready for review July 15, 2026 03:56
@YutaLin

YutaLin commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Hi @parthchandra, thanks for the review, i've made some changes and add sql test cases for map/list. Could you review this again for me, do appreciate!

cc @andygrove

@YutaLin YutaLin requested a review from parthchandra July 15, 2026 03:58
-- Config: spark.sql.timeType.enabled=true
-- Config: spark.comet.native.shuffle.partitioning.roundrobin.enabled=true
-- ConfigMatrix: spark.comet.exec.shuffle.mode=native,jvm

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.

Should we add a expect_fallback case with hash partitioning to ensure that fallback works correctly?
e.g. - SELECT /*+ REPARTITION_BY_RANGE(3, t) */ or DISTRIBUTE BY

@YutaLin

YutaLin commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @parthchandra
Thanks for the review! I've add TimeType in supportedHashPartitioningDataType and range partitioning tests. Please help me review again.

cc @andygrove

@YutaLin YutaLin requested a review from parthchandra July 16, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement TimeType support: Infrastructure - shuffle

3 participants