Skip to content

feat: Implement TimeType support - Infrastructure - shuffle#4398

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

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

Conversation

@YutaLin
Copy link
Copy Markdown
Contributor

@YutaLin YutaLin commented May 22, 2026

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
Copy link
Copy Markdown
Contributor Author

YutaLin commented May 26, 2026

Hi @parthchandra
Could you help me review this? Thanks

};
}

match data_type {
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.

I think you may need to add a match arm for DataType::Time64(TimeUnit::Nanosecond) here

SELECT /*+ REPARTITION(3) */ named_struct('t', make_time(hours, minutes, secs)) AS s FROM test_time_shuffle

query
SELECT /*+ REPARTITION(3) */ array(make_time(hours, minutes, secs)) AS arr FROM test_time_shuffle
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.

Could you add a test case for map/list

SELECT /*+ REPARTITION(3) */ map(make_time(hours, minutes, secs), hours) AS m FROM test_time_shuffle

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

2 participants