Skip to content

Commit aae6ebc

Browse files
committed
Fix compilation issues for tests
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent abf766f commit aae6ebc

19 files changed

Lines changed: 66 additions & 59 deletions

src/carnot/exec/agg_node_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ std::unique_ptr<ExecState> MakeTestExecState(udf::Registry* registry) {
476476
auto table_store = std::make_shared<table_store::TableStore>();
477477
return std::make_unique<ExecState>(registry, table_store, MockResultSinkStubGenerator,
478478
MockMetricsStubGenerator, MockTraceStubGenerator,
479-
sole::uuid4(), nullptr);
479+
MockLogStubGenerator, sole::uuid4(), nullptr);
480480
}
481481

482482
std::unique_ptr<plan::Operator> PlanNodeFromPbtxt(const std::string& pbtxt) {

src/carnot/exec/empty_source_node_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class EmptySourceNodeTest : public ::testing::Test {
4848
void SetUp() override {
4949
func_registry_ = std::make_unique<udf::Registry>("test_registry");
5050
auto table_store = std::make_shared<table_store::TableStore>();
51-
exec_state_ = std::make_unique<ExecState>(func_registry_.get(), table_store,
52-
MockResultSinkStubGenerator, MockMetricsStubGenerator,
53-
MockTraceStubGenerator, sole::uuid4(), nullptr);
51+
exec_state_ = std::make_unique<ExecState>(
52+
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
53+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
5454
}
5555

5656
std::unique_ptr<ExecState> exec_state_;

src/carnot/exec/equijoin_node_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ class JoinNodeTest : public ::testing::Test {
5252
JoinNodeTest() {
5353
func_registry_ = std::make_unique<udf::Registry>("test_registry");
5454
auto table_store = std::make_shared<table_store::TableStore>();
55-
exec_state_ = std::make_unique<ExecState>(func_registry_.get(), table_store,
56-
MockResultSinkStubGenerator, MockMetricsStubGenerator,
57-
MockTraceStubGenerator, sole::uuid4(), nullptr);
55+
exec_state_ = std::make_unique<ExecState>(
56+
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
57+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
5858
}
5959

6060
protected:

src/carnot/exec/exec_graph_test.cc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ class BaseExecGraphTest : public ::testing::Test {
7474
func_registry_->RegisterOrDie<MultiplyUDF>("multiply");
7575

7676
auto table_store = std::make_shared<table_store::TableStore>();
77-
exec_state_ = std::make_unique<ExecState>(func_registry_.get(), table_store,
78-
MockResultSinkStubGenerator, MockMetricsStubGenerator,
79-
MockTraceStubGenerator, sole::uuid4(), nullptr);
77+
exec_state_ = std::make_unique<ExecState>(
78+
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
79+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
8080
}
8181

8282
std::unique_ptr<udf::Registry> func_registry_;
@@ -174,7 +174,7 @@ TEST_P(ExecGraphExecuteTest, execute) {
174174
table_store->AddTable("numbers", table);
175175
auto exec_state_ = std::make_unique<ExecState>(
176176
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
177-
MockTraceStubGenerator, sole::uuid4(), nullptr);
177+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
178178

179179
EXPECT_OK(exec_state_->AddScalarUDF(
180180
0, "add", std::vector<types::DataType>({types::DataType::INT64, types::DataType::FLOAT64})));
@@ -255,7 +255,7 @@ TEST_F(ExecGraphTest, execute_time) {
255255

256256
auto exec_state_ = std::make_unique<ExecState>(
257257
func_registry.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
258-
MockTraceStubGenerator, sole::uuid4(), nullptr);
258+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
259259

260260
EXPECT_OK(exec_state_->AddScalarUDF(
261261
0, "add", std::vector<types::DataType>({types::DataType::INT64, types::DataType::FLOAT64})));
@@ -322,7 +322,7 @@ TEST_F(ExecGraphTest, two_limits_dont_interfere) {
322322
table_store->AddTable("numbers", table);
323323
auto exec_state_ = std::make_unique<ExecState>(
324324
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
325-
MockTraceStubGenerator, sole::uuid4(), nullptr);
325+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
326326

327327
ExecutionGraph e;
328328
auto s = e.Init(schema.get(), plan_state.get(), exec_state_.get(), plan_fragment_.get(),
@@ -390,7 +390,7 @@ TEST_F(ExecGraphTest, limit_w_multiple_srcs) {
390390
table_store->AddTable("numbers", table);
391391
auto exec_state_ = std::make_unique<ExecState>(
392392
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
393-
MockTraceStubGenerator, sole::uuid4(), nullptr);
393+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
394394

395395
ExecutionGraph e;
396396
auto s = e.Init(schema.get(), plan_state.get(), exec_state_.get(), plan_fragment_.get(),
@@ -452,7 +452,7 @@ TEST_F(ExecGraphTest, two_sequential_limits) {
452452
table_store->AddTable("numbers", table);
453453
auto exec_state_ = std::make_unique<ExecState>(
454454
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
455-
MockTraceStubGenerator, sole::uuid4(), nullptr);
455+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
456456

457457
ExecutionGraph e;
458458
auto s = e.Init(schema.get(), plan_state.get(), exec_state_.get(), plan_fragment_.get(),
@@ -515,7 +515,7 @@ TEST_F(ExecGraphTest, execute_with_two_limits) {
515515
table_store->AddTable("numbers", table);
516516
auto exec_state_ = std::make_unique<ExecState>(
517517
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
518-
MockTraceStubGenerator, sole::uuid4(), nullptr);
518+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
519519

520520
ExecutionGraph e;
521521
auto s = e.Init(schema.get(), plan_state.get(), exec_state_.get(), plan_fragment_.get(),
@@ -702,7 +702,7 @@ class GRPCExecGraphTest : public ::testing::Test {
702702
auto table_store = std::make_shared<table_store::TableStore>();
703703
exec_state_ = std::make_unique<ExecState>(
704704
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
705-
MockTraceStubGenerator, sole::uuid4(), nullptr, grpc_router_.get());
705+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr, grpc_router_.get());
706706
}
707707

708708
void SetUpPlanFragment() {

src/carnot/exec/expression_evaluator_benchmark.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
using ScalarExpression = px::carnot::plan::ScalarExpression;
4747
using ScalarExpressionVector = std::vector<std::shared_ptr<ScalarExpression>>;
4848
using px::carnot::exec::ExecState;
49+
using px::carnot::exec::MockLogStubGenerator;
4950
using px::carnot::exec::MockMetricsStubGenerator;
5051
using px::carnot::exec::MockResultSinkStubGenerator;
5152
using px::carnot::exec::MockTraceStubGenerator;
@@ -85,7 +86,7 @@ void BM_ScalarExpressionTwoCols(benchmark::State& state,
8586
PX_CHECK_OK(func_registry->Register<AddUDF>("add"));
8687
auto exec_state = std::make_unique<ExecState>(
8788
func_registry.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
88-
MockTraceStubGenerator, sole::uuid4(), nullptr);
89+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
8990
EXPECT_OK(exec_state->AddScalarUDF(
9091
0, "add",
9192
std::vector<px::types::DataType>({px::types::DataType::INT64, px::types::DataType::INT64})));

src/carnot/exec/expression_evaluator_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ class ScalarExpressionTest : public ::testing::TestWithParam<ScalarExpressionEva
116116

117117
EXPECT_TRUE(func_registry_->Register<AddUDF>("add").ok());
118118
EXPECT_TRUE(func_registry_->Register<InitArgUDF>("init_arg").ok());
119-
exec_state_ = std::make_unique<ExecState>(func_registry_.get(), table_store,
120-
MockResultSinkStubGenerator, MockMetricsStubGenerator,
121-
MockTraceStubGenerator, sole::uuid4(), nullptr);
119+
exec_state_ = std::make_unique<ExecState>(
120+
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
121+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
122122
EXPECT_OK(exec_state_->AddScalarUDF(
123123
0, "add", std::vector<types::DataType>({types::DataType::INT64, types::DataType::INT64})));
124124
EXPECT_OK(

src/carnot/exec/filter_node_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ class FilterNodeTest : public ::testing::Test {
6060
EXPECT_OK(func_registry_->Register<StrEqUDF>("eq"));
6161
auto table_store = std::make_shared<table_store::TableStore>();
6262

63-
exec_state_ = std::make_unique<ExecState>(func_registry_.get(), table_store,
64-
MockResultSinkStubGenerator, MockMetricsStubGenerator,
65-
MockTraceStubGenerator, sole::uuid4(), nullptr);
63+
exec_state_ = std::make_unique<ExecState>(
64+
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
65+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
6666
EXPECT_OK(exec_state_->AddScalarUDF(
6767
0, "eq", std::vector<types::DataType>({types::DataType::INT64, types::DataType::INT64})));
6868
EXPECT_OK(exec_state_->AddScalarUDF(

src/carnot/exec/grpc_router_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ TEST_F(GRPCRouterTest, threaded_router_test) {
352352
auto table_store = std::make_shared<table_store::TableStore>();
353353
auto exec_state = std::make_unique<ExecState>(
354354
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
355-
MockTraceStubGenerator, sole::uuid4(), nullptr);
355+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
356356

357357
MockExecNode mock_child;
358358

@@ -520,7 +520,7 @@ TEST_F(GRPCRouterTest, threaded_router_test_multi_writer) {
520520
auto table_store = std::make_shared<table_store::TableStore>();
521521
auto exec_state = std::make_unique<ExecState>(
522522
func_registry_.get(), table_store, MockResultSinkStubGenerator, MockMetricsStubGenerator,
523-
MockTraceStubGenerator, sole::uuid4(), nullptr);
523+
MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(), nullptr);
524524

525525
MockExecNode mock_child0;
526526
MockExecNode mock_child1;

src/carnot/exec/grpc_sink_node_benchmark.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "src/shared/types/types.h"
3737
#include "src/shared/types/typespb/types.pb.h"
3838

39+
using px::carnot::exec::MockLogStubGenerator;
3940
using px::carnot::exec::MockMetricsStubGenerator;
4041
using px::carnot::exec::MockTraceStubGenerator;
4142
using px::carnotpb::MockResultSinkServiceStub;
@@ -61,8 +62,8 @@ void BM_GRPCSinkNodeSplitting(benchmark::State& state) {
6162
func_registry.get(), table_store,
6263
[&](const std::string&, const std::string&)
6364
-> std::unique_ptr<ResultSinkService::StubInterface> { return std::move(mock_unique); },
64-
MockMetricsStubGenerator, MockTraceStubGenerator, sole::uuid4(), nullptr, nullptr,
65-
[&](grpc::ClientContext*) {});
65+
MockMetricsStubGenerator, MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(),
66+
nullptr, nullptr, [&](grpc::ClientContext*) {});
6667
TransferResultChunkResponse resp;
6768
resp.set_success(true);
6869
auto writer =

src/carnot/exec/grpc_sink_node_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ class GRPCSinkNodeTest : public ::testing::Test {
6868
const std::string&) -> std::unique_ptr<ResultSinkService::StubInterface> {
6969
return std::move(mock_unique_);
7070
},
71-
MockMetricsStubGenerator, MockTraceStubGenerator, sole::uuid4(), nullptr, nullptr,
72-
[this](grpc::ClientContext*) { add_metadata_called_ = true; });
71+
MockMetricsStubGenerator, MockTraceStubGenerator, MockLogStubGenerator, sole::uuid4(),
72+
nullptr, nullptr, [this](grpc::ClientContext*) { add_metadata_called_ = true; });
7373

7474
table_store::schema::Relation rel({types::DataType::BOOLEAN, types::DataType::TIME64NS},
7575
{"col1", "time_"});

0 commit comments

Comments
 (0)