From 9a64783814521b23df2d3a02dde3a2c4b06bc267 Mon Sep 17 00:00:00 2001 From: Zhenchi Date: Wed, 27 Sep 2023 13:39:48 +0000 Subject: [PATCH] feat: pushdown filters to region engine Signed-off-by: Zhenchi --- src/datanode/src/region_server.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/datanode/src/region_server.rs b/src/datanode/src/region_server.rs index 601ae1f28874..1fe9fa562faa 100644 --- a/src/datanode/src/region_server.rs +++ b/src/datanode/src/region_server.rs @@ -36,7 +36,7 @@ use datafusion::datasource::TableProvider; use datafusion::error::Result as DfResult; use datafusion::execution::context::SessionState; use datafusion_common::DataFusionError; -use datafusion_expr::{Expr as DfExpr, TableType}; +use datafusion_expr::{Expr as DfExpr, TableProviderFilterPushDown, TableType}; use datatypes::arrow::datatypes::SchemaRef; use futures_util::future::try_join_all; use prost::Message; @@ -498,4 +498,11 @@ impl TableProvider for DummyTableProvider { StreamScanAdapter::new(stream), )))) } + + fn supports_filters_pushdown( + &self, + filters: &[&DfExpr], + ) -> DfResult> { + Ok(vec![TableProviderFilterPushDown::Inexact; filters.len()]) + } }