datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Convert `Option<Vec<sort expression>>` to `Vec<sort expression>`

Open findepi opened this issue 1 year ago • 2 comments

Consider AggregateFunction.order_by field -- it is Option<Vec< /*sort expr*/ >> None means "no sorting" but this can be modeled as Some( vec![] ). Empty collection perfectly describes lack of sorting, so no need to wrap if with optional value.

Remove Option and keep just Vec.

This can be applied to

  • AggregateFunction.order_by
  • ExprFuncBuilder.order_by
  • ...

based on https://github.com/apache/datafusion/pull/12178#discussion_r1732636238 cc @crepererum

findepi avatar Aug 27 '24 11:08 findepi

take

findepi avatar Aug 27 '24 11:08 findepi

plan to work on this after https://github.com/apache/datafusion/issues/12193, as the two will conflict.

findepi avatar Aug 27 '24 11:08 findepi

Hi @findepi, can I take it if you do not work on it anymore?

ViggoC avatar Jun 29 '25 08:06 ViggoC

sure, go for it!

findepi avatar Jun 29 '25 12:06 findepi