From 7edafc340759c138da69c0649ea8b35c5581fb78 Mon Sep 17 00:00:00 2001 From: Zhenchi Date: Wed, 27 Sep 2023 21:50:44 +0800 Subject: [PATCH] feat: push down filters to region engine (#2513) 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()]) + } }