weimingdiit opened a new pull request, #2149: URL: https://github.com/apache/auron/pull/2149
# Which issue does this PR close? Closes #2134 # Rationale for this change Spark `months_between(...)` was not supported in Auron’s native execution path, so queries using it fell back instead of being planned and executed natively. This change adds native support through the extension-function path and keeps the behavior aligned with Spark semantics for `DATE` and `TIMESTAMP` inputs, including `roundOff` handling and session time zone aware calculations. # What changes are included in this PR? This PR: - adds Spark `MonthsBetween` expression conversion in `NativeConverters` - adds `buildMonthsBetweenExt` to pass `date1`, `date2`, `roundOff`, and session time zone to the native function - registers `Spark_MonthsBetween` in `datafusion-ext-functions` - implements `spark_months_between` in `spark_dates.rs` - handles Spark-compatible same-day and last-day-of-month cases, fractional month calculation, rounding, and null propagation - adds regression coverage in `AuronFunctionSuite` - adds Rust unit tests for core `months_between` semantics # Are there any user-facing changes? NO. # How was this patch tested? CI. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
