| 489 | ->testingSetCapacity(oldCapacity); |
| 490 | } |
| 491 | |
| 492 | RowTypePtr rowType_{ |
| 493 | ROW({"c0", "c1", "c2", "c3", "c4", "c5", "c6"}, |
| 494 | {BIGINT(), |
| 495 | SMALLINT(), |
| 496 | INTEGER(), |
| 497 | BIGINT(), |
| 498 | REAL(), |
| 499 | DOUBLE(), |
| 500 | VARCHAR()})}; |
| 501 | folly::Random::DefaultGenerator rng_; |
| 502 | memory::MemoryReclaimer::Stats reclaimerStats_; |
| 503 | VectorFuzzer::Options fuzzerOpts_{ |
| 504 | .vectorSize = 1024, |
| 505 | .nullRatio = 0, |
| 506 | .stringLength = 1024, |
| 507 | .stringVariableLength = false, |
| 508 | .allowLazyVector = false}; |
| 509 | }; |
| 510 | |
| 511 | template <> |
| 512 | void AggregationTest::setTestKey( |
| 513 | int64_t value, |
| 514 | int32_t multiplier, |
| 515 | vector_size_t row, |
| 516 | FlatVector<StringView>* vector) { |
| 517 | std::string chars; |
| 518 | if (multiplier == 2) { |
| 519 | chars.resize(2); |
| 520 | chars[0] = (value % 64) + 32; |
| 521 | chars[1] = ((value / 64) % 64) + 32; |
| 522 | } else { |
| 523 | chars = fmt::format("{}", value); |
| 524 | for (int i = 2; i < multiplier; ++i) { |
| 525 | chars = chars + fmt::format("{}", i * value); |
| 526 | } |
| 527 | } |
| 528 | vector->set(row, StringView(chars)); |
| 529 | } |
| 530 | |
| 531 | TEST_P(AggregationTest, missingFunctionOrSignature) { |
| 532 | auto data = makeRowVector({ |
| 533 | makeFlatVector<int64_t>({1, 2, 3}), |
| 534 | makeFlatVector<bool>({true, true, false}), |
| 535 | }); |
| 536 | |
| 537 | // (smallint, varchar) -> bigint |
| 538 | registerAggregateFunction( |
| 539 | "test_aggregate", |
| 540 | {AggregateFunctionSignatureBuilder() |
| 541 | .returnType("bigint") |
| 542 | .intermediateType("tinyint") |
| 543 | .argumentType("smallint") |
| 544 | .argumentType("varchar") |
| 545 | .build()}, |
| 546 | [&](core::AggregationNode::Step step, |
| 547 | const std::vector<TypePtr>& argTypes, |
| 548 | const TypePtr& resultType, |
nothing calls this directly
no test coverage detected