Skip to content

Commit 410a7e8

Browse files
committed
task: updated dependencies and refactored
Primary changes in this commit involve refactoring to accommodate schema resolution and the use of additional substrait and mohair types. Additionally, this commit includes changes to various binaries to accommodate API changes
1 parent e9a0466 commit 410a7e8

18 files changed

+779
-408
lines changed

poetry.lock

+89-65
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+5-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "query processing for decomposable queries"
55
authors = ["Aldrin M <[email protected]>"]
66
license = "Apache License 2.0"
77
packages = [
8-
{ include = "mohair" , from = "src/python" }
8+
{ include = "mohair", from = "src/python" }
99
,{ include = "skyproto", from = "src/python" }
1010
]
1111

@@ -19,11 +19,10 @@ datafusion = "^35.0.0"
1919
pkgconfig = "^1.5.5"
2020
pyarrow-hotfix = "^0.6"
2121
protobuf = "==5.28.3"
22-
substrait = "==0.20.0"
23-
ibis-substrait = "==4.0.0"
24-
pyarrow = "^18.0.0"
25-
26-
[tool.poetry.dev-dependencies]
22+
substrait = "^0.23.0"
23+
#ibis-substrait = "==4.0.0"
24+
pyarrow = "^19.0.0"
25+
ibis-skytether = "^0.1.0"
2726

2827
[tool.poetry.scripts]
2928
mohair = "mohair.cli:cli"

src/cpp/skytether/apidep_arrow.hpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <arrow/api.h>
2525

2626
// >> Arrow serialization API
27+
#include <arrow/io/api.h>
2728
#include <arrow/ipc/api.h>
2829

2930
// >> Arrow filesystem API
@@ -54,8 +55,12 @@ namespace skytether {
5455
using arrow::RecordBatchVector;
5556

5657
// >> Support types for I/O
57-
using arrow::io::RandomAccessFile;
5858
using ArrowOutputStream = arrow::io::OutputStream;
59+
using arrow::io::RandomAccessFile;
60+
using arrow::io::BufferOutputStream;
61+
62+
using arrow::ipc::IpcWriteOptions;
63+
using arrow::ipc::WriteRecordBatchStream;
5964

6065
using arrow::RecordBatchReader;
6166
using arrow::ipc::RecordBatchStreamReader;

src/cpp/skytether/apidep_mohair.hpp

+19-7
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,34 @@ namespace skytether {
4444
using AnyMessage = google::protobuf::Any;
4545

4646
// >> Mohair query processing types
47-
using skyproto::mohair::SuperPlan;
48-
using skyproto::mohair::SubPlan;
49-
using skyproto::mohair::ErrRel;
47+
using mohair::Plan;
48+
using mohair::SuperPlan;
49+
using mohair::SubPlan;
50+
51+
using mohair::PlanRel;
52+
using mohair::RelRoot;
53+
54+
using mohair::Rel;
55+
using mohair::RelCommon;
56+
using mohair::ErrRel;
57+
using mohair::ExtensionLeafRel;
58+
using mohair::SkyResultRel;
5059

5160
// >> Mohair topology types
52-
using skyproto::mohair::ServiceConfig;
53-
using skyproto::mohair::DeviceClass;
61+
using mohair::ServiceConfig;
62+
using mohair::DeviceClass;
5463

5564
// >> Types from mohair
5665
using mohair::PlanMessage;
57-
using mohair::SubstraitMessage;
5866

5967
using mohair::SystemPlan;
68+
using mohair::PlanSplit;
69+
using mohair::DecomposeAlg;
70+
71+
using mohair::SubstraitSchema;
72+
using mohair::SubstraitType;
6073

6174
// TODO: see if these should be aliased in mohair
62-
using SubstraitType = skyproto::substrait::Type;
6375
using SubstraitExpression = skyproto::substrait::Expression;
6476
using SubstraitSortField = skyproto::substrait::SortField;
6577

src/cpp/skytether/apidep_standard.hpp

+12
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
#include <fstream>
4848
#include <filesystem>
4949

50+
// >> Concurrency
51+
#include <atomic>
52+
#include <mutex>
53+
#include <condition_variable>
54+
5055

5156
// ------------------------------
5257
// Type aliases
@@ -69,5 +74,12 @@ namespace skytether {
6974
using std::stringstream;
7075
using std::fstream;
7176

77+
// >> Safety type aliases
78+
using std::atomic;
79+
using std::mutex;
80+
using std::condition_variable;
81+
using std::unique_lock;
82+
using std::lock_guard;
83+
7284
} // namespace: skytether
7385

src/cpp/toolbox/csd-service.cpp

+13-4
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct ServiceActions {
106106
return ERRCODE_API_REGISTER;
107107
}
108108

109-
SkytetherDebugMsg("Initializing service with config:");
109+
SkytetherDebugMsg("Initializing connected service with config:");
110110
skytether::services::PrintConfig(service_cfg.get());
111111

112112
return 0;
@@ -117,7 +117,7 @@ struct ServiceActions {
117117
service_cfg = std::make_unique<ServiceConfig>();
118118
service_cfg->set_service_location(service_loc.ToString());
119119

120-
SkytetherDebugMsg("Initializing service with config:");
120+
SkytetherDebugMsg("Initializing local-only service with config:");
121121
skytether::services::PrintConfig(service_cfg.get());
122122

123123
return 0;
@@ -161,8 +161,17 @@ struct ServiceActions {
161161
}
162162

163163
#if SKYTETHER_USE_DUCKDB
164-
auto skytether_duckcse = std::make_unique<DuckDBService>(&fn_deactivate);
165-
auto status_start = StartService(*skytether_duckcse, *service_cfg);
164+
auto skytether_service = std::make_unique<DuckDBService>(
165+
std::move(service_cfg), &fn_deactivate
166+
);
167+
168+
auto status_connect = skytether_service->ConnectToTopology();
169+
if (not status_connect.ok()) {
170+
skytether::PrintError("Unable to connect to downstream services", status_connect);
171+
return ERRCODE_START_SRV;
172+
}
173+
174+
auto status_start = StartService(*skytether_service, service_loc);
166175
if (not status_start.ok()) {
167176
skytether::PrintError("Unable to start csd-service", status_start);
168177
return ERRCODE_START_SRV;

0 commit comments

Comments
 (0)