TileDB
TileDB copied to clipboard
Add SC-54468 min/max regression test cases: min/max cannot return a NULL result on a non-nullable attribute, even when appropriate
While playing with adding aggregate functions to tiledb-rs I observed that the min and max aggregate operations return 0 when the array is empty.
In SQL, the min and max aggregate functions are expected to return NULL when there are no non-NULL inputs. While we are not SQL, I do believe it is important to be compliant with this expectation:
- many users will be prepared with knowledge and expectations of SQL.
- the result of zero is not distinguishable from an actual result and this may mislead users into drawing incorrect conclusions.
- Zero may not even be a value in the array!
We should improve the behavior so that min/max functions can always return NULL. This PR adds regression tests demonstrating that we can't or don't do this..
TYPE: BUG DESC: add regression test demonstrating problems with non-nullable min/max result