Skip to content

Commit 74cdf6f

Browse files
authored
Combine Cargo workspaces (#23)
1 parent 9d720f4 commit 74cdf6f

File tree

17 files changed

+34
-59
lines changed

17 files changed

+34
-59
lines changed

Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
[workspace]
1919
members = [
20-
"datafusion",
21-
"datafusion-examples",
20+
"datafusion",
21+
"datafusion-examples",
2222
"benchmarks",
23-
]
24-
25-
# this package is excluded because it requires different compilation flags, thereby significantly changing
26-
# how it is compiled within the workspace, causing the whole workspace to be compiled from scratch
27-
# this way, this is a stand-alone package that compiles independently of the others.
28-
exclude = ["ballista"]
23+
"ballista/rust/benchmarks/tpch",
24+
"ballista/rust/client",
25+
"ballista/rust/core",
26+
"ballista/rust/executor",
27+
"ballista/rust/scheduler",
28+
]

ballista/rust/Cargo.toml

Lines changed: 0 additions & 30 deletions
This file was deleted.

ballista/rust/benchmarks/tpch/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
[package]
1919
name = "tpch"
20-
version = "0.4.2-SNAPSHOT"
20+
version = "0.5.0-SNAPSHOT"
2121
homepage = "https://github.com/apache/arrow"
2222
repository = "https://github.com/apache/arrow"
2323
authors = ["Apache Arrow <dev@arrow.apache.org>"]

ballista/rust/client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
name = "ballista"
2020
description = "Ballista Distributed Compute"
2121
license = "Apache-2.0"
22-
version = "0.4.2-SNAPSHOT"
22+
version = "0.5.0-SNAPSHOT"
2323
homepage = "https://github.com/apache/arrow"
2424
repository = "https://github.com/apache/arrow"
2525
authors = ["Apache Arrow <dev@arrow.apache.org>"]

ballista/rust/client/src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use ballista_core::serde::protobuf::{
3030
};
3131
use ballista_core::{
3232
client::BallistaClient,
33-
datasource::DFTableAdapter,
33+
datasource::DfTableAdapter,
3434
error::{BallistaError, Result},
3535
memory_stream::MemoryStream,
3636
utils::create_datafusion_context,
@@ -151,7 +151,7 @@ impl BallistaContext {
151151
let execution_plan = ctx.create_physical_plan(&plan)?;
152152
ctx.register_table(
153153
TableReference::Bare { table: name },
154-
Arc::new(DFTableAdapter::new(plan, execution_plan)),
154+
Arc::new(DfTableAdapter::new(plan, execution_plan)),
155155
)?;
156156
}
157157
let df = ctx.sql(sql)?;

ballista/rust/core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
name = "ballista-core"
2020
description = "Ballista Distributed Compute"
2121
license = "Apache-2.0"
22-
version = "0.4.2-SNAPSHOT"
22+
version = "0.5.0-SNAPSHOT"
2323
homepage = "https://github.com/apache/arrow"
2424
repository = "https://github.com/apache/arrow"
2525
authors = ["Apache Arrow <dev@arrow.apache.org>"]

ballista/rust/core/src/datasource.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ use datafusion::{
3030
/// TableProvider which is effectively a wrapper around a physical plan. We need to be able to
3131
/// register tables so that we can create logical plans from SQL statements that reference these
3232
/// tables.
33-
pub struct DFTableAdapter {
33+
pub struct DfTableAdapter {
3434
/// DataFusion logical plan
3535
pub logical_plan: LogicalPlan,
3636
/// DataFusion execution plan
3737
plan: Arc<dyn ExecutionPlan>,
3838
}
3939

40-
impl DFTableAdapter {
40+
impl DfTableAdapter {
4141
pub fn new(logical_plan: LogicalPlan, plan: Arc<dyn ExecutionPlan>) -> Self {
4242
Self { logical_plan, plan }
4343
}
4444
}
4545

46-
impl TableProvider for DFTableAdapter {
46+
impl TableProvider for DfTableAdapter {
4747
fn as_any(&self) -> &dyn Any {
4848
self
4949
}

ballista/rust/core/src/error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ pub enum BallistaError {
4949
TokioError(tokio::task::JoinError),
5050
}
5151

52+
#[allow(clippy::from_over_into)]
5253
impl<T> Into<Result<T>> for BallistaError {
5354
fn into(self) -> Result<T> {
5455
Err(self)

ballista/rust/core/src/serde/logical_plan/from_proto.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ impl TryInto<arrow::datatypes::DataType> for &protobuf::arrow_type::ArrowTypeEnu
436436
}
437437
}
438438

439+
#[allow(clippy::from_over_into)]
439440
impl Into<arrow::datatypes::DataType> for protobuf::PrimitiveScalarType {
440441
fn into(self) -> arrow::datatypes::DataType {
441442
use arrow::datatypes::DataType;
@@ -1170,6 +1171,7 @@ impl TryFrom<i32> for protobuf::FileType {
11701171
}
11711172
}
11721173

1174+
#[allow(clippy::from_over_into)]
11731175
impl Into<datafusion::sql::parser::FileType> for protobuf::FileType {
11741176
fn into(self) -> datafusion::sql::parser::FileType {
11751177
use datafusion::sql::parser::FileType;

ballista/rust/core/src/serde/logical_plan/to_proto.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::{
2424
convert::{TryFrom, TryInto},
2525
};
2626

27-
use crate::datasource::DFTableAdapter;
27+
use crate::datasource::DfTableAdapter;
2828
use crate::serde::{protobuf, BallistaError};
2929

3030
use arrow::datatypes::{DataType, Schema};
@@ -679,7 +679,7 @@ impl TryInto<protobuf::LogicalPlanNode> for &LogicalPlan {
679679

680680
// unwrap the DFTableAdapter to get to the real TableProvider
681681
let source = if let Some(adapter) =
682-
source.as_any().downcast_ref::<DFTableAdapter>()
682+
source.as_any().downcast_ref::<DfTableAdapter>()
683683
{
684684
match &adapter.logical_plan {
685685
LogicalPlan::TableScan { source, .. } => Ok(source.as_any()),
@@ -1021,7 +1021,7 @@ impl TryInto<protobuf::LogicalExprNode> for &Expr {
10211021
let fun: protobuf::ScalarFunction = fun.try_into()?;
10221022
let expr: Vec<protobuf::LogicalExprNode> = args
10231023
.iter()
1024-
.map(|e| Ok(e.try_into()?))
1024+
.map(|e| e.try_into())
10251025
.collect::<Result<Vec<protobuf::LogicalExprNode>, BallistaError>>()?;
10261026
Ok(protobuf::LogicalExprNode {
10271027
expr_type: Some(
@@ -1164,6 +1164,7 @@ impl TryInto<protobuf::LogicalExprNode> for &Expr {
11641164
}
11651165
}
11661166

1167+
#[allow(clippy::from_over_into)]
11671168
impl Into<protobuf::Schema> for &Schema {
11681169
fn into(self) -> protobuf::Schema {
11691170
protobuf::Schema {

0 commit comments

Comments
 (0)