Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Gardner committed Oct 22, 2022
1 parent bdc0492 commit 70f7693
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
1 change: 1 addition & 0 deletions datafusion/core/src/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ impl TableProviderFactory for TestTableFactory {

/// TableProvider for testing purposes
pub struct TestTableProvider {
/// URL of table files or folder
pub url: String,
}

Expand Down
30 changes: 13 additions & 17 deletions datafusion/proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ mod roundtrip_tests {
Ok(())
}

#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, PartialEq, Eq, ::prost::Message)]
pub struct TestTableProto {
/// URL of the table root
#[prost(string, tag = "1")]
Expand All @@ -149,9 +149,9 @@ mod roundtrip_tests {
impl LogicalExtensionCodec for TestTableProviderCodec {
fn try_decode(
&self,
buf: &[u8],
inputs: &[LogicalPlan],
ctx: &SessionContext,
_buf: &[u8],
_inputs: &[LogicalPlan],
_ctx: &SessionContext,
) -> Result<Extension, DataFusionError> {
Err(DataFusionError::NotImplemented(
"No extension codec provided".to_string(),
Expand All @@ -160,8 +160,8 @@ mod roundtrip_tests {

fn try_encode(
&self,
node: &Extension,
buf: &mut Vec<u8>,
_node: &Extension,
_buf: &mut Vec<u8>,
) -> Result<(), DataFusionError> {
Err(DataFusionError::NotImplemented(
"No extension codec provided".to_string(),
Expand All @@ -182,9 +182,7 @@ mod roundtrip_tests {
.runtime_env
.table_factories
.get("testtable")
.ok_or_else(|| {
DataFusionError::Plan(format!("Unable to find testtable factory",))
})?;
.expect("Unable to find testtable factory");
let provider = (*factory).with_schema(schema, msg.url.as_str())?;
Ok(provider)
}
Expand All @@ -198,9 +196,7 @@ mod roundtrip_tests {
.as_ref()
.as_any()
.downcast_ref::<TestTableProvider>()
.ok_or(DataFusionError::Internal(
"Can't encode non-test tables".to_string(),
))?;
.expect("Can't encode non-test tables");
let msg = TestTableProto {
url: table.url.clone(),
};
Expand Down Expand Up @@ -430,9 +426,9 @@ mod roundtrip_tests {

fn try_decode_table_provider(
&self,
buf: &[u8],
schema: SchemaRef,
ctx: &SessionContext,
_buf: &[u8],
_schema: SchemaRef,
_ctx: &SessionContext,
) -> Result<Arc<dyn TableProvider>, DataFusionError> {
Err(DataFusionError::Internal(
"unsupported plan type".to_string(),
Expand All @@ -441,8 +437,8 @@ mod roundtrip_tests {

fn try_encode_table_provider(
&self,
node: Arc<dyn TableProvider>,
buf: &mut Vec<u8>,
_node: Arc<dyn TableProvider>,
_buf: &mut Vec<u8>,
) -> Result<(), DataFusionError> {
Err(DataFusionError::Internal(
"unsupported plan type".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion datafusion/proto/src/logical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// under the License.

use crate::protobuf::logical_plan_node::LogicalPlanType::CustomScan;
use crate::protobuf::{CustomTableScanNode, LogicalExprNode, ProjectionColumns};
use crate::protobuf::CustomTableScanNode;
use crate::{
from_proto::{self, parse_expr},
protobuf::{
Expand Down

0 comments on commit 70f7693

Please sign in to comment.