xfocus3 opened a new pull request, #22720:
URL: https://github.com/apache/datafusion/pull/22720

   ## Which issue does this PR close?
   
   - Closes #22717.
   
   ## Rationale for this change
   
   Spark does not trim `dayOfWeek` before matching it in `next_day`, but 
`datafusion-spark` currently does. That makes values like `' MO '` succeed in 
DataFusion even though Spark treats them as invalid.
   
   ## What changes are included in this PR?
   
   - remove the `.trim()` call from `spark_next_day`
   - add a regression test proving whitespace-padded day names are rejected
   
   ## Are these changes tested?
   
   - `cargo test -p datafusion-spark 
next_day_rejects_whitespace_padded_day_names -- --nocapture`
   - `cargo test -p datafusion-spark`
   - `cargo fmt --all --check`
   - `cargo clippy -p datafusion-spark --all-targets --all-features --no-deps 
-- -D warnings`
   
   Note: the broader package clippy invocation still reports an existing unused 
import warning in untouched `datafusion/core/src/execution/session_state.rs` on 
current main.
   
   ## Are there any user-facing changes?
   
   Behavior now matches Spark for whitespace-padded `dayOfWeek` inputs in 
`next_day`.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to