ozankabak commented on PR #10117: URL: https://github.com/apache/arrow-datafusion/pull/10117#issuecomment-2061771725
The problem I see with this representation is that `Monotonicity::Increasing` and `Monotonicity::Mixed(vec![Some(true), ..., Some(true)])` refers to the same actual configuration. If one writes a check like `given_monotonicity == Monotonicity::Increasing` (and I'm sure people will), one will miss the alternative representation (which may easily arise when one generates this information programmatically if no special treatment is done). I think we can find a refactor that increases readability but doesn't introduce such traps. Maybe a struct with an inner `Vec<Option<bool>>` and methods that define an API structuring how one interacts with it. @alamb -- 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]
