Describe the bug
For binary expressions or multi-input functions , if their args are ordered but the nulls_first option in SortOptions differs, they are still very likely to be unordered.
For example, as pointed out by @2010YOUY01 in #11571 (comment)
Looks like the following logic is not completely correct 🤔 e.g. base is DESC NULLS FIRST num is ASC NULLS LAST This implementation will return log(base, num) is ASC NULLS LAST But the actual output might look like
Which is unordered.
To Reproduce
Need to examine the code.
- The methods of
SortProperties, such as add, sub, seem to not consider nulls_first.
- Similar to log.rs (should be fixed in PR 11571), the implementation of
ScalarUDFImpl::output_ordering also needs to be reviewed.
Expected behavior
No response
Additional context
No response
Describe the bug
For binary expressions or multi-input functions , if their args are ordered but the
nulls_firstoption inSortOptionsdiffers, they are still very likely to be unordered.For example, as pointed out by @2010YOUY01 in #11571 (comment)
To Reproduce
Need to examine the code.
SortProperties, such as add,sub, seem to not consider nulls_first.ScalarUDFImpl::output_orderingalso needs to be reviewed.Expected behavior
No response
Additional context
No response