Skip to content

feat: support multiply_ym_interval with YearMonth interval codegen dispatch#4715

Open
peterxcli wants to merge 2 commits into
apache:mainfrom
peterxcli:feat/make_ym_interval
Open

feat: support multiply_ym_interval with YearMonth interval codegen dispatch#4715
peterxcli wants to merge 2 commits into
apache:mainfrom
peterxcli:feat/make_ym_interval

Conversation

@peterxcli

@peterxcli peterxcli commented Jun 24, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Part of #4540.

Rationale for this change

This adds support for Spark's multiply_ym_interval expression, allowing YearMonth interval multiplication to run through Comet instead of falling back to
Spark.

What changes are included in this PR?

  • Add YearMonthIntervalType serialization to the Comet proto/native type mapping.
  • Route MakeYMInterval and MultiplyYMInterval through the JVM codegen dispatcher.
  • Add IntervalYearVector input/output support in the codegen kernel path.
  • Add YearMonth interval literal support.
  • Update expression/datatype support docs.
  • Add SQL coverage for YearMonth interval multiplication with integer, long, float, double, and decimal multipliers.

How are these changes tested?

  • cargo fmt
  • ./mvnw -Pspark-3.5 -Pscala-2.12 -DskipTests compile
  • cargo +1.94.0 check -p datafusion-comet
  • cargo +1.94.0 build
  • ./mvnw test -Pspark-3.5 -Pscala-2.12 -Dtest=none -Dsuites="org.apache.comet.CometSqlFileTestSuite multiply_ym_interval"

@peterxcli peterxcli changed the title Support multiply_ym_interval with YearMonth interval codegen dispatch feat: support multiply_ym_interval with YearMonth interval codegen dispatch Jun 24, 2026
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.

1 participant