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

   ## Which issue does this PR close?
   
   Closes #26913.
   
   ## Rationale for this change
   
   An explicit origin currently prevents `date_bin` from reusing range 
partitioning for aggregation, even when its buckets align with every range 
split.
   
   ## What changes are included in this PR?
   
   Admit non-null literal origins while retaining timezone-less nanosecond 
timestamps and positive fixed-duration, month-free strides. A fixed origin 
shifts the buckets without changing their nondecreasing behavior. The existing 
boundary proof still rejects crossing buckets and evaluation errors.
   
   ## What is the testing strategy for this PR?
   
   SQLLogicTests check plans and results for explicit epoch, shifted-aligned, 
and crossing origins. Unit tests cover rejected arguments, ascending/descending 
splits, and fail-closed boundary errors.
   
   ## Are there any user-facing changes?
   
   More aligned `date_bin` aggregations can avoid a hash shuffle. No 
function-result or public API changes.
   
   ---
   Note: This PR was developed with AI assistance. All changes have been 
reviewed, and I take full responsibility for this contribution.
   


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