| 44 | namespace compute { |
| 45 | |
| 46 | TEST(FunctionOptions, Equality) { |
| 47 | std::vector<std::shared_ptr<FunctionOptions>> options; |
| 48 | options.emplace_back(new ScalarAggregateOptions()); |
| 49 | options.emplace_back(new ScalarAggregateOptions(/*skip_nulls=*/false, /*min_count=*/1)); |
| 50 | options.emplace_back(new CountOptions()); |
| 51 | options.emplace_back(new CountOptions(CountOptions::ALL)); |
| 52 | options.emplace_back(new ModeOptions()); |
| 53 | options.emplace_back(new ModeOptions(/*n=*/2)); |
| 54 | options.emplace_back(new VarianceOptions()); |
| 55 | options.emplace_back(new VarianceOptions(/*ddof=*/2)); |
| 56 | options.emplace_back(new QuantileOptions()); |
| 57 | options.emplace_back( |
| 58 | new QuantileOptions(/*q=*/0.75, QuantileOptions::Interpolation::MIDPOINT)); |
| 59 | options.emplace_back(new TDigestOptions()); |
| 60 | options.emplace_back( |
| 61 | new TDigestOptions(/*q=*/0.75, /*delta=*/50, /*buffer_size=*/1024)); |
| 62 | options.emplace_back(new IndexOptions(ScalarFromJSON(int64(), "16"))); |
| 63 | options.emplace_back(new IndexOptions(ScalarFromJSON(boolean(), "true"))); |
| 64 | options.emplace_back(new IndexOptions(ScalarFromJSON(boolean(), "null"))); |
| 65 | options.emplace_back(new ArithmeticOptions()); |
| 66 | options.emplace_back(new ArithmeticOptions(/*check_overflow=*/true)); |
| 67 | options.emplace_back(new RoundOptions()); |
| 68 | options.emplace_back( |
| 69 | new RoundOptions(/*ndigits=*/2, /*round_mode=*/RoundMode::TOWARDS_INFINITY)); |
| 70 | options.emplace_back(new RoundTemporalOptions()); |
| 71 | options.emplace_back(new RoundTemporalOptions( |
| 72 | /*multiple=*/2, |
| 73 | /*unit=*/CalendarUnit::WEEK, /*week_starts_monday*/ true)); |
| 74 | options.emplace_back(new RoundToMultipleOptions()); |
| 75 | options.emplace_back(new RoundToMultipleOptions( |
| 76 | /*multiple=*/100, /*round_mode=*/RoundMode::TOWARDS_INFINITY)); |
| 77 | options.emplace_back(new ElementWiseAggregateOptions()); |
| 78 | options.emplace_back(new ElementWiseAggregateOptions(/*skip_nulls=*/false)); |
| 79 | options.emplace_back(new JoinOptions()); |
| 80 | options.emplace_back(new JoinOptions(JoinOptions::REPLACE, "replacement")); |
| 81 | options.emplace_back(new MatchSubstringOptions("pattern")); |
| 82 | options.emplace_back(new MatchSubstringOptions("pattern", /*ignore_case=*/true)); |
| 83 | options.emplace_back(new SplitOptions()); |
| 84 | options.emplace_back(new SplitOptions(/*max_splits=*/2, /*reverse=*/true)); |
| 85 | options.emplace_back(new SplitPatternOptions("pattern")); |
| 86 | options.emplace_back( |
| 87 | new SplitPatternOptions("pattern", /*max_splits=*/2, /*reverse=*/true)); |
| 88 | options.emplace_back(new ReplaceSubstringOptions("pattern", "replacement")); |
| 89 | options.emplace_back( |
| 90 | new ReplaceSubstringOptions("pattern", "replacement", /*max_replacements=*/2)); |
| 91 | options.emplace_back(new ReplaceSliceOptions(0, 1, "foo")); |
| 92 | options.emplace_back(new ReplaceSliceOptions(1, -1, "bar")); |
| 93 | options.emplace_back(new ExtractRegexOptions("pattern")); |
| 94 | options.emplace_back(new ExtractRegexOptions("pattern2")); |
| 95 | options.emplace_back(new SetLookupOptions(ArrayFromJSON(int64(), "[1, 2, 3, 4]"))); |
| 96 | options.emplace_back(new SetLookupOptions(ArrayFromJSON(boolean(), "[true, false]"))); |
| 97 | options.emplace_back(new StrptimeOptions("%Y", TimeUnit::type::MILLI, true)); |
| 98 | options.emplace_back(new StrptimeOptions("%Y", TimeUnit::type::NANO)); |
| 99 | options.emplace_back(new StrftimeOptions("%Y-%m-%dT%H:%M:%SZ", "C")); |
| 100 | options.emplace_back(new AssumeTimezoneOptions( |
| 101 | "Europe/Amsterdam", AssumeTimezoneOptions::Ambiguous::AMBIGUOUS_RAISE, |
| 102 | AssumeTimezoneOptions::Nonexistent::NONEXISTENT_RAISE)); |
| 103 | options.emplace_back(new PadOptions(5, " ")); |
nothing calls this directly
no test coverage detected