liyafan82 opened a new pull request #2355:
URL: https://github.com/apache/calcite/pull/2355


   Suppose we have a relation with 3 columns: `(a, '1', '2')`. The first column 
comes from an underlying table, while the other two columns are constants.
   
   For this relation, we should have `NDV({1}) = 1`, since column 1 is a 
constant (`NDV({1})` denotes the number of distinct values for column 1), which 
have only one possible value (suppose the column index starts from 0).
   
   Similarly, we should have `NDV({1, 2}) = 1`, since both columns are 
constants.
   
   We should also have `NDV({0, 1}) == NDV({0})`, because the number of 
distinct values depends on the non-const column, which is `a` from the 
underlying table.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to