| 967 | Datum Expected(int64_t value) { return MakeScalar(static_cast<int64_t>(value)); } |
| 968 | |
| 969 | void Check(Datum input, int64_t expected_all, bool has_nulls = true) { |
| 970 | int64_t expected_valid = has_nulls ? expected_all - 1 : expected_all; |
| 971 | int64_t expected_null = has_nulls ? 1 : 0; |
| 972 | CheckScalar("count_distinct", {input}, Expected(expected_valid), &only_valid); |
| 973 | CheckScalar("count_distinct", {input}, Expected(expected_null), &only_null); |
| 974 | CheckScalar("count_distinct", {input}, Expected(expected_all), &all); |
| 975 | } |
| 976 | |
| 977 | void Check(const std::shared_ptr<DataType>& type, std::string_view json, |
| 978 | int64_t expected_all, bool has_nulls = true) { |
nothing calls this directly
no test coverage detected