You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "zhuqi-lucas (via GitHub)" <gi...@apache.org> on 2025/12/19 09:27:43 UTC

[I] Support sort prefix removal when it's logical_constants. [datafusion]

zhuqi-lucas opened a new issue, #19403:
URL: https://github.com/apache/datafusion/issues/19403

   ### Is your feature request related to a problem or challenge?
   
   After https://github.com/apache/datafusion/pull/19064 done, i found it can't meet my internal project requirements, this ticket want to support sort prefix removal for the logical_constants.
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support sort prefix removal when it's logical_constants. [datafusion]

Posted by "zhuqi-lucas (via GitHub)" <gi...@apache.org>.
zhuqi-lucas commented on issue #19403:
URL: https://github.com/apache/datafusion/issues/19403#issuecomment-3680124450

   Hi @Nithurshen , sorry i already had a PR, and i will redesign the logic here, and it's not limited to  prefix removal, but also monotonic, etc. Also i will update my slt cases.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support sort prefix removal when it's logical_constants. [datafusion]

Posted by "Nithurshen (via GitHub)" <gi...@apache.org>.
Nithurshen commented on issue #19403:
URL: https://github.com/apache/datafusion/issues/19403#issuecomment-3680133826

   @zhuqi-lucas, No problem.
   I will close mine.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Redesign the try_reverse_output to support more cases [datafusion]

Posted by "zhuqi-lucas (via GitHub)" <gi...@apache.org>.
zhuqi-lucas closed issue #19403: Redesign the try_reverse_output to support more cases
URL: https://github.com/apache/datafusion/issues/19403


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Support sort prefix removal when it's logical_constants. [datafusion]

Posted by "Nithurshen (via GitHub)" <gi...@apache.org>.
Nithurshen commented on issue #19403:
URL: https://github.com/apache/datafusion/issues/19403#issuecomment-3680079957

   Hi @zhuqi-lucas , I have opened a PR to address this issue.
   
   I implemented the logic in `PushdownSort` to utilize `EquivalenceProperties`. The optimizer now detects if a column in the sort prefix is constant and strips it from the `required_ordering` before attempting the pushdown.
   
   I've also added a unit test using a mock plan to verify that the `SortExec` is correctly removed when the prefix is constant.
   
   Kindly let me know what you think.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org