TileDB icon indicating copy to clipboard operation
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

Open rroelke opened this issue 1 year ago • 0 comments

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:

  1. many users will be prepared with knowledge and expectations of SQL.
  2. the result of zero is not distinguishable from an actual result and this may mislead users into drawing incorrect conclusions.
  3. 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

rroelke avatar Sep 04 '24 19:09 rroelke