Skip to content

Commit

Permalink
fix rebase errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wjones127 committed Jul 13, 2024
1 parent 5b5926c commit 66dec81
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions rust/lance-core/src/utils/mask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ impl<'a> Extend<&'a u64> for RowIdTreeMap {
}

// Extending with RowIdTreeMap is basically a cumulative set union
impl Extend<RowIdTreeMap> for RowIdTreeMap {
fn extend<T: IntoIterator<Item = RowIdTreeMap>>(&mut self, iter: T) {
impl Extend<Self> for RowIdTreeMap {
fn extend<T: IntoIterator<Item = Self>>(&mut self, iter: T) {
for other in iter {
for (fragment, set) in other.inner {
match self.inner.get_mut(&fragment) {
Expand Down
7 changes: 4 additions & 3 deletions rust/lance-index/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ use arrow::buffer::{OffsetBuffer, ScalarBuffer};
use arrow_array::{ListArray, RecordBatch};
use arrow_schema::{Field, Schema};
use async_trait::async_trait;
use datafusion::functions_array::array_has;
use datafusion::physical_plan::SendableRecordBatchStream;
use datafusion_common::{scalar::ScalarValue, Column};

use datafusion_expr::expr::ScalarFunction;
use datafusion_expr::{Expr, ScalarFunctionDefinition};
use datafusion_expr::Expr;
use deepsize::DeepSizeOf;
use lance_core::utils::mask::RowIdTreeMap;
use lance_core::Result;
Expand Down Expand Up @@ -257,7 +258,7 @@ impl AnyQuery for LabelListQuery {
.unwrap();
let labels_arr = Arc::new(labels_list);
Expr::ScalarFunction(ScalarFunction {
func_def: ScalarFunctionDefinition::Name("array_contains_all".into()),
func: Arc::new(array_has::ArrayHasAll::new().into()),
args: vec![
Expr::Column(Column::new_unqualified(col)),
Expr::Literal(ScalarValue::List(labels_arr)),
Expand All @@ -277,7 +278,7 @@ impl AnyQuery for LabelListQuery {
.unwrap();
let labels_arr = Arc::new(labels_list);
Expr::ScalarFunction(ScalarFunction {
func_def: ScalarFunctionDefinition::Name("array_contains_any".into()),
func: Arc::new(array_has::ArrayHasAny::new().into()),
args: vec![
Expr::Column(Column::new_unqualified(col)),
Expr::Literal(ScalarValue::List(labels_arr)),
Expand Down
10 changes: 5 additions & 5 deletions rust/lance-index/src/scalar/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use async_trait::async_trait;
use datafusion_common::ScalarValue;
use datafusion_expr::{
expr::{InList, ScalarFunction},
Between, BinaryExpr, Expr, Operator, ScalarFunctionDefinition,
Between, BinaryExpr, Expr, Operator, ScalarUDF,
};

use futures::join;
Expand Down Expand Up @@ -75,7 +75,7 @@ pub trait ScalarQueryParser: std::fmt::Debug + Send + Sync {
&self,
column: &str,
data_type: &DataType,
func: &ScalarFunctionDefinition,
func: &ScalarUDF,
args: &[Expr],
) -> Option<IndexedExpression>;
}
Expand Down Expand Up @@ -146,7 +146,7 @@ impl ScalarQueryParser for SargableQueryParser {
&self,
_: &str,
_: &DataType,
_: &ScalarFunctionDefinition,
_: &ScalarUDF,
_: &[Expr],
) -> Option<IndexedExpression> {
None
Expand Down Expand Up @@ -181,7 +181,7 @@ impl ScalarQueryParser for LabelListQueryParser {
&self,
column: &str,
data_type: &DataType,
func: &ScalarFunctionDefinition,
func: &ScalarUDF,
args: &[Expr],
) -> Option<IndexedExpression> {
if args.len() != 2 {
Expand Down Expand Up @@ -628,7 +628,7 @@ fn visit_scalar_fn(
return None;
}
let (col, data_type, query_parser) = maybe_indexed_column(&scalar_fn.args[0], index_info)?;
query_parser.visit_scalar_function(col, data_type, &scalar_fn.func_def, &scalar_fn.args)
query_parser.visit_scalar_function(col, data_type, &scalar_fn.func, &scalar_fn.args)
}

fn visit_node(expr: &Expr, index_info: &dyn IndexInformationProvider) -> Option<IndexedExpression> {
Expand Down

0 comments on commit 66dec81

Please sign in to comment.