Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/execution_plans/network_coalesce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use crate::channel_resolver_ext::get_distributed_channel_resolver;
use crate::common::scale_partitioning_props;
use crate::config_extension_ext::ContextGrpcMetadata;
use crate::distributed_physical_optimizer_rule::{NetworkBoundary, limit_tasks_err};
use crate::errors::{map_flight_to_datafusion_error, map_status_to_datafusion_error};
use crate::execution_plans::{DistributedTaskContext, StageExec};
use crate::flight_service::DoGet;
use crate::metrics::proto::MetricsSetProto;
use crate::protobuf::errors::{map_flight_to_datafusion_error, map_status_to_datafusion_error};
use crate::protobuf::{DistributedCodec, StageKey, proto_from_stage};
use arrow_flight::Ticket;
use arrow_flight::decode::FlightRecordBatchStream;
Expand Down
2 changes: 1 addition & 1 deletion src/execution_plans/network_shuffle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ use crate::channel_resolver_ext::get_distributed_channel_resolver;
use crate::common::scale_partitioning;
use crate::config_extension_ext::ContextGrpcMetadata;
use crate::distributed_physical_optimizer_rule::NetworkBoundary;
use crate::errors::{map_flight_to_datafusion_error, map_status_to_datafusion_error};
use crate::execution_plans::{DistributedTaskContext, StageExec};
use crate::flight_service::DoGet;
use crate::metrics::proto::MetricsSetProto;
use crate::protobuf::errors::{map_flight_to_datafusion_error, map_status_to_datafusion_error};
use crate::protobuf::{DistributedCodec, StageKey, proto_from_stage};
use arrow_flight::Ticket;
use arrow_flight::decode::FlightRecordBatchStream;
Expand Down
2 changes: 1 addition & 1 deletion src/flight_service/do_get.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::config_extension_ext::ContextGrpcMetadata;
use crate::errors::datafusion_error_to_tonic_status;
use crate::execution_plans::{DistributedTaskContext, StageExec};
use crate::flight_service::service::ArrowFlightEndpoint;
use crate::flight_service::session_builder::DistributedSessionBuilderContext;
use crate::protobuf::errors::datafusion_error_to_tonic_status;
use crate::protobuf::{DistributedCodec, StageExecProto, StageKey, stage_from_proto};
use arrow_flight::Ticket;
use arrow_flight::encode::FlightDataEncoderBuilder;
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod common;
mod config_extension_ext;
mod distributed_ext;
mod distributed_physical_optimizer_rule;
mod errors;
mod execution_plans;
mod flight_service;
mod metrics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::errors::io_error::IoErrorProto;
use datafusion::arrow::error::ArrowError;

use crate::protobuf::errors::io_error::IoErrorProto;

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArrowErrorProto {
#[prost(string, optional, tag = "1")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::errors::arrow_error::ArrowErrorProto;
use crate::errors::io_error::IoErrorProto;
use crate::errors::objectstore_error::ObjectStoreErrorProto;
use crate::errors::parquet_error::ParquetErrorProto;
use crate::errors::parser_error::ParserErrorProto;
use crate::errors::schema_error::SchemaErrorProto;
use crate::protobuf::errors::arrow_error::ArrowErrorProto;
use crate::protobuf::errors::io_error::IoErrorProto;
use crate::protobuf::errors::objectstore_error::ObjectStoreErrorProto;
use crate::protobuf::errors::parquet_error::ParquetErrorProto;
use crate::protobuf::errors::parser_error::ParserErrorProto;
use crate::protobuf::errors::schema_error::SchemaErrorProto;
use datafusion::common::{DataFusionError, Diagnostic};
use datafusion::logical_expr::sqlparser::parser::ParserError;
use std::error::Error;
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/errors/mod.rs → src/protobuf/errors/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#![allow(clippy::upper_case_acronyms, clippy::vec_box)]

use crate::errors::datafusion_error::DataFusionErrorProto;
use arrow_flight::error::FlightError;
use datafusion::common::internal_datafusion_err;
use datafusion::error::DataFusionError;
use prost::Message;

use crate::protobuf::errors::datafusion_error::DataFusionErrorProto;

mod arrow_error;
mod datafusion_error;
mod io_error;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/protobuf/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod distributed_codec;
pub mod errors;
Copy link
Collaborator

@gabotechs gabotechs Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note how in all the modules of the project, we try to be strict about what's visible to the outside by not making the inner modules public. It would be fine to be consistent here and:

  • instead of blindly exposing the inner errors module:
Suggested change
pub mod errors;
mod errors;
  • Just expose the few things that are strictly needed:
pub(crate) use errors::{
    datafusion_error_to_tonic_status, map_flight_to_datafusion_error,
    map_status_to_datafusion_error,
};

Copy link
Contributor Author

@jonathanc-n jonathanc-n Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this makes sense. I like the way this is done compared to Datafusion, lets you see everything that is public at a glance 😄

mod stage_proto;
mod user_codec;

Expand Down