| 1007 | Datum Expected(int64_t value) { return MakeScalar(static_cast<int64_t>(value)); } |
| 1008 | |
| 1009 | void Check(Datum input, int64_t expected_all, bool has_nulls = true) { |
| 1010 | int64_t expected_valid = has_nulls ? expected_all - 1 : expected_all; |
| 1011 | int64_t expected_null = has_nulls ? 1 : 0; |
| 1012 | CheckScalar("count_distinct", {input}, Expected(expected_valid), &only_valid); |
| 1013 | CheckScalar("count_distinct", {input}, Expected(expected_null), &only_null); |
| 1014 | CheckScalar("count_distinct", {input}, Expected(expected_all), &all); |
| 1015 | } |
| 1016 | |
| 1017 | void Check(const std::shared_ptr<DataType>& type, std::string_view json, |
| 1018 | int64_t expected_all, bool has_nulls = true) { |
nothing calls this directly
no test coverage detected