Table::ColumnRefinement - Proposed subdivision of the values of a column
This class encapsulates the distribution of values in a column, together with some helper methods.
(Name is subject to aprupt change)
Returns true if all rows in refinement have the same value for this column.
Returns true if the refinement actually is no refinement because it either all rows have the same column value or all rows have a different column value.
In fact, this method returns one of two strings, depending on how triviality is reached:
implicit means that all rows in the refinement have the same value for the column.
trivial means that all rows have a different value from each other for the column.
is_trivial should look at the query too,
to determine of a value is
given in the query already.
But that goes too far for the moment.
Returns true if the different values of the column partition the whole result set, that is, there are no NULL values in the column for the resultset.
There should be comparison operators implementing subset semantics, that is, the should check whether two column refinements are equal (that is, they result in exactly the same subdivisions), or one is finer than the other (that is, each subset of one refinement is completely contained within a subset of the other, but the refinements are not equal), or undefined (none of the above).
This would create a half-order on the refinements.