lyne7-sc commented on issue #25052: URL: https://github.com/apache/datafusion/issues/25052#issuecomment-6981319609
Hi @jayzhan211, I wanted to get your thoughts on the scope of #25053 before revising it. The join can preserve the probe-side ordering, but appending the build-side ordering requires an additional guarantee. When multiple probe rows share the same ordering prefix, each row can restart the sequence of build matches, so the build-side suffix may be out of order. The patch already handles several cases where uniqueness on the probe or build side makes that suffix safe. There still seem to be cases where we could prove the output is ordered and avoid a sort, but the logic is already getting a bit complicated. I’m concerned that adding more special cases could make it harder to follow and maintain. I’m wondering whether it’s worth covering more of these cases in this PR or keeping the inference focused on a few common ones. This matters when a query asks for just the first few rows in a given order from an unbounded stream. Even if a partial sort can use the probe-side ordering, it may still have to wait for the current group to end before returning any rows. I’d like to check with you on that before changing the patch. -- 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]
