mirror of
https://github.com/langchain-ai/datafusion-materialized-views.git
synced 2026-07-01 21:04:01 -04:00
+12
-12
@@ -29,23 +29,23 @@ rust-version = "1.85.1"
|
||||
|
||||
[dependencies]
|
||||
aquamarine = "0.6.0"
|
||||
arrow = "57.0.0"
|
||||
arrow-schema = "57.0.0"
|
||||
arrow = "57.1.0"
|
||||
arrow-schema = "57.1.0"
|
||||
async-trait = "0.1.89"
|
||||
dashmap = "6"
|
||||
datafusion = "51"
|
||||
datafusion-common = "51"
|
||||
datafusion-expr = "51"
|
||||
datafusion-functions = "51"
|
||||
datafusion-functions-aggregate = "51"
|
||||
datafusion-optimizer = "51"
|
||||
datafusion-physical-expr = "51"
|
||||
datafusion-physical-plan = "51"
|
||||
datafusion-sql = "51"
|
||||
datafusion = "52"
|
||||
datafusion-common = "52"
|
||||
datafusion-expr = "52"
|
||||
datafusion-functions = "52"
|
||||
datafusion-functions-aggregate = "52"
|
||||
datafusion-optimizer = "52"
|
||||
datafusion-physical-expr = "52"
|
||||
datafusion-physical-plan = "52"
|
||||
datafusion-sql = "52"
|
||||
futures = "0.3"
|
||||
itertools = "0.14"
|
||||
log = "0.4"
|
||||
object_store = "0.12"
|
||||
object_store = "0.12.4"
|
||||
ordered-float = "5.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -860,7 +860,7 @@ fn project_dfschema(schema: &DFSchema, indices: &HashSet<usize>) -> Result<DFSch
|
||||
.filter_map(|i| {
|
||||
indices.contains(&i).then_some({
|
||||
let (reference, field) = schema.qualified_field(i);
|
||||
(reference.cloned(), Arc::new(field.clone()))
|
||||
(reference.cloned(), field.clone())
|
||||
})
|
||||
})
|
||||
.collect_vec();
|
||||
@@ -1940,19 +1940,20 @@ mod test {
|
||||
",
|
||||
projection: &["year"],
|
||||
expected_plan: vec![
|
||||
"+--------------+--------------------------------------------------------------------+",
|
||||
"| plan_type | plan |",
|
||||
"+--------------+--------------------------------------------------------------------+",
|
||||
"| logical_plan | Union |",
|
||||
"| | Projection: coalesce(CAST(t1.year AS Utf8View), t2.year) AS year |",
|
||||
"| | Full Join: Using CAST(t1.year AS Utf8View) = t2.year |",
|
||||
"| | SubqueryAlias: t1 |",
|
||||
"| | Projection: t1.column1 AS year |",
|
||||
"| | TableScan: t1 projection=[column1] |",
|
||||
"| | SubqueryAlias: t2 |",
|
||||
"| | TableScan: t2 projection=[year] |",
|
||||
"| | TableScan: t3 projection=[year] |",
|
||||
"+--------------+--------------------------------------------------------------------+",
|
||||
"+--------------+---------------------------------------------------------------------------------------------------+",
|
||||
"| plan_type | plan |",
|
||||
"+--------------+---------------------------------------------------------------------------------------------------+",
|
||||
"| logical_plan | Union |",
|
||||
"| | Projection: CASE WHEN __common_expr_2 IS NOT NULL THEN __common_expr_2 ELSE t2.year END AS year |",
|
||||
"| | Projection: CAST(t1.year AS Utf8View) AS __common_expr_2, t2.year |",
|
||||
"| | Full Join: Using CAST(t1.year AS Utf8View) = t2.year |",
|
||||
"| | SubqueryAlias: t1 |",
|
||||
"| | Projection: t1.column1 AS year |",
|
||||
"| | TableScan: t1 projection=[column1] |",
|
||||
"| | SubqueryAlias: t2 |",
|
||||
"| | TableScan: t2 projection=[year] |",
|
||||
"| | TableScan: t3 projection=[year] |",
|
||||
"+--------------+---------------------------------------------------------------------------------------------------+",
|
||||
],
|
||||
expected_output: vec![
|
||||
"+------+",
|
||||
|
||||
@@ -718,11 +718,11 @@ impl Predicate {
|
||||
Some(range) => range,
|
||||
};
|
||||
|
||||
if other_range.contains(range)? != Interval::CERTAINLY_TRUE {
|
||||
if other_range.contains(range)? != Interval::TRUE {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
if range.contains(other_range)? != Interval::CERTAINLY_TRUE {
|
||||
if range.contains(other_range)? != Interval::TRUE {
|
||||
if !(range.lower().is_null() || range.upper().is_null())
|
||||
&& (range.lower().eq(range.upper()))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user