diff --git a/datafusion-testing b/datafusion-testing index eccb0e4a42634..4f51385956def 160000 --- a/datafusion-testing +++ b/datafusion-testing @@ -1 +1 @@ -Subproject commit eccb0e4a426344ef3faf534cd60e02e9c3afd3ac +Subproject commit 4f51385956def519527727d38af484ecce0c2958 diff --git a/datafusion/expr/src/expr.rs b/datafusion/expr/src/expr.rs index 582e8e41dd0cf..de401472d5422 100644 --- a/datafusion/expr/src/expr.rs +++ b/datafusion/expr/src/expr.rs @@ -1850,7 +1850,7 @@ impl Expr { /// Return `self AS name` alias expression pub fn alias(self, name: impl Into) -> Expr { - Expr::Alias(Alias::new(self, None::<&str>, name.into())) + Expr::Alias(Alias::new(self.unalias(), None::, name)) } /// Return `self AS name` alias expression with metadata @@ -1881,7 +1881,7 @@ impl Expr { relation: Option>, name: impl Into, ) -> Expr { - Expr::Alias(Alias::new(self, relation, name.into())) + Expr::Alias(Alias::new(self.unalias(), relation, name)) } /// Return `self AS name` alias expression with a specific qualifier and metadata @@ -1915,7 +1915,8 @@ impl Expr { /// /// # Example /// ``` - /// # use datafusion_expr::col; + /// # use datafusion_expr::{col, Expr}; + /// # use datafusion_expr::expr::Alias; /// // `foo as "bar"` is unaliased to `foo` /// let expr = col("foo").alias("bar"); /// assert_eq!(expr.unalias(), col("foo")); @@ -1925,7 +1926,12 @@ impl Expr { /// assert_eq!(expr.clone().unalias(), expr); /// /// // `foo as "bar" as "baz" is unaliased to foo as "bar" - /// let expr = col("foo").alias("bar").alias("baz"); + /// let expr = Expr::Alias(Alias { + /// expr: Box::new(col("foo").alias("bar")), + /// name: "baz".to_owned(), + /// relation: None, + /// metadata: None + /// }); /// assert_eq!(expr.unalias(), col("foo").alias("bar")); /// ``` pub fn unalias(self) -> Expr { diff --git a/datafusion/optimizer/src/analyzer/type_coercion.rs b/datafusion/optimizer/src/analyzer/type_coercion.rs index 7b81feab47a99..8ab3748145a1a 100644 --- a/datafusion/optimizer/src/analyzer/type_coercion.rs +++ b/datafusion/optimizer/src/analyzer/type_coercion.rs @@ -1275,7 +1275,7 @@ fn project_with_column_index( .enumerate() .map(|(i, e)| match e { Expr::Alias(Alias { ref name, .. }) if name != schema.field(i).name() => { - Ok(e.unalias().alias(schema.field(i).name())) + Ok(e.alias(schema.field(i).name())) } Expr::Column(Column { relation: _, diff --git a/datafusion/optimizer/tests/optimizer_integration.rs b/datafusion/optimizer/tests/optimizer_integration.rs index 14e02c8693b2a..420eb80ec0041 100644 --- a/datafusion/optimizer/tests/optimizer_integration.rs +++ b/datafusion/optimizer/tests/optimizer_integration.rs @@ -447,7 +447,7 @@ fn eliminate_redundant_null_check_on_count() { assert_snapshot!( format!("{plan}"), @r" - Projection: test.col_int32, count(Int64(1)) AS count(*) AS c + Projection: test.col_int32, count(Int64(1)) AS c Aggregate: groupBy=[[test.col_int32]], aggr=[[count(Int64(1))]] TableScan: test projection=[col_int32] " diff --git a/datafusion/sql/src/utils.rs b/datafusion/sql/src/utils.rs index 1a76dd69f46c5..4d214f8c81a6b 100644 --- a/datafusion/sql/src/utils.rs +++ b/datafusion/sql/src/utils.rs @@ -703,12 +703,13 @@ mod tests { use arrow::datatypes::{DataType as ArrowDataType, Field, Fields, Schema}; use datafusion_common::{Column, DFSchema, Result}; use datafusion_expr::{ - ColumnUnnestList, EmptyRelation, LogicalPlan, col, lit, unnest, + ColumnUnnestList, EmptyRelation, Expr, LogicalPlan, col, lit, unnest, }; use datafusion_functions::core::expr_ext::FieldAccessor; use datafusion_functions_aggregate::expr_fn::count; use crate::utils::{resolve_positions_to_exprs, rewrite_recursive_unnest_bottom_up}; + use datafusion_expr::expr::Alias; use indexmap::IndexMap; fn column_unnests_eq( @@ -813,10 +814,14 @@ mod tests { assert_eq!( transformed_exprs, - vec![ - (col("__unnest_placeholder(3d_col,depth=1)").alias("UNNEST(3d_col)")) - .alias("2d_col") - ] + vec![Expr::Alias(Alias { + expr: Box::new( + col("__unnest_placeholder(3d_col,depth=1)").alias("UNNEST(3d_col)") + ), + relation: None, + name: "2d_col".to_owned(), + metadata: None, + })] ); column_unnests_eq( vec![ diff --git a/datafusion/sqllogictest/test_files/aggregate.slt b/datafusion/sqllogictest/test_files/aggregate.slt index 00ca0482a31e1..ed831d62b25d4 100644 --- a/datafusion/sqllogictest/test_files/aggregate.slt +++ b/datafusion/sqllogictest/test_files/aggregate.slt @@ -8832,7 +8832,7 @@ ORDER BY g; # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/aggregate_repartition.slt b/datafusion/sqllogictest/test_files/aggregate_repartition.slt index 1f1e726811675..2302e161bfe72 100644 --- a/datafusion/sqllogictest/test_files/aggregate_repartition.slt +++ b/datafusion/sqllogictest/test_files/aggregate_repartition.slt @@ -131,7 +131,7 @@ physical_plan # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok SET datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt b/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt index cd95426a9b0bb..947d29475e7bb 100644 --- a/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt +++ b/datafusion/sqllogictest/test_files/aggregate_skip_partial.slt @@ -220,7 +220,7 @@ e true false NULL statement ok reset datafusion.execution.batch_size; -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; @@ -712,7 +712,7 @@ ORDER BY i; statement ok reset datafusion.execution.batch_size; -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; @@ -772,7 +772,7 @@ true false false false false true false NULL statement ok reset datafusion.execution.batch_size; -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/array/cleanup.slt.part b/datafusion/sqllogictest/test_files/array/cleanup.slt.part index a11a4770ec058..eff5d17acf37f 100644 --- a/datafusion/sqllogictest/test_files/array/cleanup.slt.part +++ b/datafusion/sqllogictest/test_files/array/cleanup.slt.part @@ -167,4 +167,3 @@ drop table large_arrays_values_without_nulls; statement ok drop table fixed_size_arrays_values_without_nulls; - diff --git a/datafusion/sqllogictest/test_files/array/init_data.slt.part b/datafusion/sqllogictest/test_files/array/init_data.slt.part index f5cc58fb2be58..06d029303022b 100644 --- a/datafusion/sqllogictest/test_files/array/init_data.slt.part +++ b/datafusion/sqllogictest/test_files/array/init_data.slt.part @@ -688,5 +688,3 @@ AS arrow_cast(column4, 'FixedSizeList(3, Float64)') AS column4 FROM arrays_distance_table ; - - diff --git a/datafusion/sqllogictest/test_files/clickbench.slt b/datafusion/sqllogictest/test_files/clickbench.slt index c79701e347109..9543c48d0fd96 100644 --- a/datafusion/sqllogictest/test_files/clickbench.slt +++ b/datafusion/sqllogictest/test_files/clickbench.slt @@ -263,7 +263,7 @@ EXPLAIN SELECT "RegionID", SUM("AdvEngineID"), COUNT(*) AS c, AVG("ResolutionWid ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.RegionID, sum(hits.AdvEngineID), count(Int64(1)) AS count(*) AS c, avg(hits.ResolutionWidth), count(DISTINCT hits.UserID) +02)--Projection: hits.RegionID, sum(hits.AdvEngineID), count(Int64(1)) AS c, avg(hits.ResolutionWidth), count(DISTINCT hits.UserID) 03)----Aggregate: groupBy=[[hits.RegionID]], aggr=[[sum(CAST(hits.AdvEngineID AS Int64)), count(Int64(1)), avg(CAST(hits.ResolutionWidth AS Float64)), count(DISTINCT hits.UserID)]] 04)------SubqueryAlias: hits 05)--------TableScan: hits_raw projection=[RegionID, UserID, ResolutionWidth, AdvEngineID] @@ -350,7 +350,7 @@ EXPLAIN SELECT "SearchPhrase", COUNT(*) AS c FROM hits WHERE "SearchPhrase" <> ' ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.SearchPhrase, count(Int64(1)) AS count(*) AS c +02)--Projection: hits.SearchPhrase, count(Int64(1)) AS c 03)----Aggregate: groupBy=[[hits.SearchPhrase]], aggr=[[count(Int64(1))]] 04)------SubqueryAlias: hits 05)--------Filter: hits_raw.SearchPhrase != Utf8View("") @@ -406,7 +406,7 @@ EXPLAIN SELECT "SearchEngineID", "SearchPhrase", COUNT(*) AS c FROM hits WHERE " ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.SearchEngineID, hits.SearchPhrase, count(Int64(1)) AS count(*) AS c +02)--Projection: hits.SearchEngineID, hits.SearchPhrase, count(Int64(1)) AS c 03)----Aggregate: groupBy=[[hits.SearchEngineID, hits.SearchPhrase]], aggr=[[count(Int64(1))]] 04)------SubqueryAlias: hits 05)--------Filter: hits_raw.SearchPhrase != Utf8View("") @@ -590,7 +590,7 @@ EXPLAIN SELECT "SearchPhrase", MIN("URL"), COUNT(*) AS c FROM hits WHERE "URL" L ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.SearchPhrase, min(hits.URL), count(Int64(1)) AS count(*) AS c +02)--Projection: hits.SearchPhrase, min(hits.URL), count(Int64(1)) AS c 03)----Aggregate: groupBy=[[hits.SearchPhrase]], aggr=[[min(hits.URL), count(Int64(1))]] 04)------SubqueryAlias: hits 05)--------Filter: hits_raw.URL LIKE Utf8View("%google%") AND hits_raw.SearchPhrase != Utf8View("") @@ -616,7 +616,7 @@ EXPLAIN SELECT "SearchPhrase", MIN("URL"), MIN("Title"), COUNT(*) AS c, COUNT(DI ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.SearchPhrase, min(hits.URL), min(hits.Title), count(Int64(1)) AS count(*) AS c, count(DISTINCT hits.UserID) +02)--Projection: hits.SearchPhrase, min(hits.URL), min(hits.Title), count(Int64(1)) AS c, count(DISTINCT hits.UserID) 03)----Aggregate: groupBy=[[hits.SearchPhrase]], aggr=[[min(hits.URL), min(hits.Title), count(Int64(1)), count(DISTINCT hits.UserID)]] 04)------SubqueryAlias: hits 05)--------Filter: hits_raw.Title LIKE Utf8View("%Google%") AND hits_raw.URL NOT LIKE Utf8View("%.google.%") AND hits_raw.SearchPhrase != Utf8View("") @@ -730,7 +730,7 @@ EXPLAIN SELECT "CounterID", AVG(length("URL")) AS l, COUNT(*) AS c FROM hits WHE ---- logical_plan 01)Sort: l DESC NULLS FIRST, fetch=25 -02)--Projection: hits.CounterID, avg(length(hits.URL)) AS l, count(Int64(1)) AS count(*) AS c +02)--Projection: hits.CounterID, avg(length(hits.URL)) AS l, count(Int64(1)) AS c 03)----Filter: count(Int64(1)) > Int64(100000) 04)------Aggregate: groupBy=[[hits.CounterID]], aggr=[[avg(CAST(character_length(hits.URL) AS length(hits.URL) AS Float64)), count(Int64(1))]] 05)--------SubqueryAlias: hits @@ -758,7 +758,7 @@ EXPLAIN SELECT REGEXP_REPLACE("Referer", '^https?://(?:www\.)?([^/]+)/.*$', '\1' ---- logical_plan 01)Sort: l DESC NULLS FIRST, fetch=25 -02)--Projection: regexp_replace(hits.Referer,Utf8("^https?://(?:www\.)?([^/]+)/.*$"),Utf8("\1")) AS k, avg(length(hits.Referer)) AS l, count(Int64(1)) AS count(*) AS c, min(hits.Referer) +02)--Projection: regexp_replace(hits.Referer,Utf8("^https?://(?:www\.)?([^/]+)/.*$"),Utf8("\1")) AS k, avg(length(hits.Referer)) AS l, count(Int64(1)) AS c, min(hits.Referer) 03)----Filter: count(Int64(1)) > Int64(100000) 04)------Aggregate: groupBy=[[regexp_replace(hits.Referer, Utf8View("^https?://(?:www\.)?([^/]+)/.*$"), Utf8View("\1")) AS regexp_replace(hits.Referer,Utf8("^https?://(?:www\.)?([^/]+)/.*$"),Utf8("\1"))]], aggr=[[avg(CAST(character_length(hits.Referer) AS length(hits.Referer) AS Float64)), count(Int64(1)), min(hits.Referer)]] 05)--------SubqueryAlias: hits @@ -807,7 +807,7 @@ EXPLAIN SELECT "SearchEngineID", "ClientIP", COUNT(*) AS c, SUM("IsRefresh"), AV ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.SearchEngineID, hits.ClientIP, count(Int64(1)) AS count(*) AS c, sum(hits.IsRefresh), avg(hits.ResolutionWidth) +02)--Projection: hits.SearchEngineID, hits.ClientIP, count(Int64(1)) AS c, sum(hits.IsRefresh), avg(hits.ResolutionWidth) 03)----Aggregate: groupBy=[[hits.SearchEngineID, hits.ClientIP]], aggr=[[count(Int64(1)), sum(CAST(hits.IsRefresh AS Int64)), avg(CAST(hits.ResolutionWidth AS Float64))]] 04)------SubqueryAlias: hits 05)--------Projection: hits_raw.ClientIP, hits_raw.IsRefresh, hits_raw.ResolutionWidth, hits_raw.SearchEngineID @@ -834,7 +834,7 @@ EXPLAIN SELECT "WatchID", "ClientIP", COUNT(*) AS c, SUM("IsRefresh"), AVG("Reso ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.WatchID, hits.ClientIP, count(Int64(1)) AS count(*) AS c, sum(hits.IsRefresh), avg(hits.ResolutionWidth) +02)--Projection: hits.WatchID, hits.ClientIP, count(Int64(1)) AS c, sum(hits.IsRefresh), avg(hits.ResolutionWidth) 03)----Aggregate: groupBy=[[hits.WatchID, hits.ClientIP]], aggr=[[count(Int64(1)), sum(CAST(hits.IsRefresh AS Int64)), avg(CAST(hits.ResolutionWidth AS Float64))]] 04)------SubqueryAlias: hits 05)--------Projection: hits_raw.WatchID, hits_raw.ClientIP, hits_raw.IsRefresh, hits_raw.ResolutionWidth @@ -861,7 +861,7 @@ EXPLAIN SELECT "WatchID", "ClientIP", COUNT(*) AS c, SUM("IsRefresh"), AVG("Reso ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.WatchID, hits.ClientIP, count(Int64(1)) AS count(*) AS c, sum(hits.IsRefresh), avg(hits.ResolutionWidth) +02)--Projection: hits.WatchID, hits.ClientIP, count(Int64(1)) AS c, sum(hits.IsRefresh), avg(hits.ResolutionWidth) 03)----Aggregate: groupBy=[[hits.WatchID, hits.ClientIP]], aggr=[[count(Int64(1)), sum(CAST(hits.IsRefresh AS Int64)), avg(CAST(hits.ResolutionWidth AS Float64))]] 04)------SubqueryAlias: hits 05)--------TableScan: hits_raw projection=[WatchID, ClientIP, IsRefresh, ResolutionWidth] @@ -894,7 +894,7 @@ EXPLAIN SELECT "URL", COUNT(*) AS c FROM hits GROUP BY "URL" ORDER BY c DESC LIM ---- logical_plan 01)Sort: c DESC NULLS FIRST, fetch=10 -02)--Projection: hits.URL, count(Int64(1)) AS count(*) AS c +02)--Projection: hits.URL, count(Int64(1)) AS c 03)----Aggregate: groupBy=[[hits.URL]], aggr=[[count(Int64(1))]] 04)------SubqueryAlias: hits 05)--------TableScan: hits_raw projection=[URL] @@ -981,7 +981,7 @@ EXPLAIN SELECT "URL", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND ---- logical_plan 01)Sort: pageviews DESC NULLS FIRST, fetch=10 -02)--Projection: hits.URL, count(Int64(1)) AS count(*) AS pageviews +02)--Projection: hits.URL, count(Int64(1)) AS pageviews 03)----Aggregate: groupBy=[[hits.URL]], aggr=[[count(Int64(1))]] 04)------SubqueryAlias: hits 05)--------Projection: hits_raw.URL @@ -1008,7 +1008,7 @@ EXPLAIN SELECT "Title", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 A ---- logical_plan 01)Sort: pageviews DESC NULLS FIRST, fetch=10 -02)--Projection: hits.Title, count(Int64(1)) AS count(*) AS pageviews +02)--Projection: hits.Title, count(Int64(1)) AS pageviews 03)----Aggregate: groupBy=[[hits.Title]], aggr=[[count(Int64(1))]] 04)------SubqueryAlias: hits 05)--------Projection: hits_raw.Title @@ -1036,7 +1036,7 @@ EXPLAIN SELECT "URL", COUNT(*) AS PageViews FROM hits WHERE "CounterID" = 62 AND logical_plan 01)Limit: skip=1000, fetch=10 02)--Sort: pageviews DESC NULLS FIRST, fetch=1010 -03)----Projection: hits.URL, count(Int64(1)) AS count(*) AS pageviews +03)----Projection: hits.URL, count(Int64(1)) AS pageviews 04)------Aggregate: groupBy=[[hits.URL]], aggr=[[count(Int64(1))]] 05)--------SubqueryAlias: hits 06)----------Projection: hits_raw.URL @@ -1065,7 +1065,7 @@ EXPLAIN SELECT "TraficSourceID", "SearchEngineID", "AdvEngineID", CASE WHEN ("Se logical_plan 01)Limit: skip=1000, fetch=10 02)--Sort: pageviews DESC NULLS FIRST, fetch=1010 -03)----Projection: hits.TraficSourceID, hits.SearchEngineID, hits.AdvEngineID, CASE WHEN hits.SearchEngineID = Int64(0) AND hits.AdvEngineID = Int64(0) THEN hits.Referer ELSE Utf8("") END AS src, hits.URL AS dst, count(Int64(1)) AS count(*) AS pageviews +03)----Projection: hits.TraficSourceID, hits.SearchEngineID, hits.AdvEngineID, CASE WHEN hits.SearchEngineID = Int64(0) AND hits.AdvEngineID = Int64(0) THEN hits.Referer ELSE Utf8("") END AS src, hits.URL AS dst, count(Int64(1)) AS pageviews 04)------Aggregate: groupBy=[[hits.TraficSourceID, hits.SearchEngineID, hits.AdvEngineID, CASE WHEN hits.SearchEngineID = Int16(0) AND hits.AdvEngineID = Int16(0) THEN hits.Referer ELSE Utf8View("") END AS CASE WHEN hits.SearchEngineID = Int64(0) AND hits.AdvEngineID = Int64(0) THEN hits.Referer ELSE Utf8("") END, hits.URL]], aggr=[[count(Int64(1))]] 05)--------SubqueryAlias: hits 06)----------Projection: hits_raw.URL, hits_raw.Referer, hits_raw.TraficSourceID, hits_raw.SearchEngineID, hits_raw.AdvEngineID @@ -1094,7 +1094,7 @@ EXPLAIN SELECT "URLHash", "EventDate", COUNT(*) AS PageViews FROM hits WHERE "Co logical_plan 01)Limit: skip=100, fetch=10 02)--Sort: pageviews DESC NULLS FIRST, fetch=110 -03)----Projection: hits.URLHash, hits.EventDate, count(Int64(1)) AS count(*) AS pageviews +03)----Projection: hits.URLHash, hits.EventDate, count(Int64(1)) AS pageviews 04)------Aggregate: groupBy=[[hits.URLHash, hits.EventDate]], aggr=[[count(Int64(1))]] 05)--------SubqueryAlias: hits 06)----------Projection: hits_raw.URLHash, CAST(CAST(hits_raw.EventDate AS Int32) AS Date32) AS EventDate @@ -1124,7 +1124,7 @@ EXPLAIN SELECT "WindowClientWidth", "WindowClientHeight", COUNT(*) AS PageViews logical_plan 01)Limit: skip=10000, fetch=10 02)--Sort: pageviews DESC NULLS FIRST, fetch=10010 -03)----Projection: hits.WindowClientWidth, hits.WindowClientHeight, count(Int64(1)) AS count(*) AS pageviews +03)----Projection: hits.WindowClientWidth, hits.WindowClientHeight, count(Int64(1)) AS pageviews 04)------Aggregate: groupBy=[[hits.WindowClientWidth, hits.WindowClientHeight]], aggr=[[count(Int64(1))]] 05)--------SubqueryAlias: hits 06)----------Projection: hits_raw.WindowClientWidth, hits_raw.WindowClientHeight @@ -1153,7 +1153,7 @@ EXPLAIN SELECT DATE_TRUNC('minute', to_timestamp_seconds("EventTime")) AS M, COU logical_plan 01)Limit: skip=1000, fetch=10 02)--Sort: date_trunc(Utf8("minute"), m) ASC NULLS LAST, fetch=1010 -03)----Projection: date_trunc(Utf8("minute"),to_timestamp_seconds(hits.EventTime)) AS m, count(Int64(1)) AS count(*) AS pageviews +03)----Projection: date_trunc(Utf8("minute"),to_timestamp_seconds(hits.EventTime)) AS m, count(Int64(1)) AS pageviews 04)------Aggregate: groupBy=[[date_trunc(Utf8("minute"), to_timestamp_seconds(hits.EventTime))]], aggr=[[count(Int64(1))]] 05)--------SubqueryAlias: hits 06)----------Projection: hits_raw.EventTime diff --git a/datafusion/sqllogictest/test_files/count_star_rule.slt b/datafusion/sqllogictest/test_files/count_star_rule.slt index a1c0e6303a765..c5d743115e46f 100644 --- a/datafusion/sqllogictest/test_files/count_star_rule.slt +++ b/datafusion/sqllogictest/test_files/count_star_rule.slt @@ -57,7 +57,7 @@ query TT EXPLAIN SELECT t1.a, COUNT() AS cnt FROM t1 GROUP BY t1.a HAVING COUNT() > 0; ---- logical_plan -01)Projection: t1.a, count(Int64(1)) AS count() AS cnt +01)Projection: t1.a, count(Int64(1)) AS cnt 02)--Filter: count(Int64(1)) > Int64(0) 03)----Aggregate: groupBy=[[t1.a]], aggr=[[count(Int64(1))]] 04)------TableScan: t1 projection=[a] @@ -78,7 +78,7 @@ query TT EXPLAIN SELECT a, COUNT() OVER (PARTITION BY a) AS count_a FROM t1; ---- logical_plan -01)Projection: t1.a, count(Int64(1)) PARTITION BY [t1.a] ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING AS count() PARTITION BY [t1.a] ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING AS count_a +01)Projection: t1.a, count(Int64(1)) PARTITION BY [t1.a] ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING AS count_a 02)--WindowAggr: windowExpr=[[count(Int64(1)) PARTITION BY [t1.a] ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING]] 03)----TableScan: t1 projection=[a] physical_plan diff --git a/datafusion/sqllogictest/test_files/date_bin_errors.slt b/datafusion/sqllogictest/test_files/date_bin_errors.slt index b6cda471d7afa..d95c27b96a060 100644 --- a/datafusion/sqllogictest/test_files/date_bin_errors.slt +++ b/datafusion/sqllogictest/test_files/date_bin_errors.slt @@ -23,7 +23,7 @@ select date_bin(interval '1637426858 months', to_timestamp_millis(1040292460), t ---- NULL -# Negative timestamp with month interval - should return NULL instead of panicking +# Negative timestamp with month interval - should return NULL instead of panicking query P select date_bin(interval '1 month', to_timestamp_millis(-1040292460), timestamp '1984-01-07 00:00:00'); ---- @@ -57,4 +57,4 @@ select date_bin( timestamp '1984-01-07 00:00:00' ) as b; ---- -NULL \ No newline at end of file +NULL diff --git a/datafusion/sqllogictest/test_files/group_by.slt b/datafusion/sqllogictest/test_files/group_by.slt index b313424951532..eb197c191c0fc 100644 --- a/datafusion/sqllogictest/test_files/group_by.slt +++ b/datafusion/sqllogictest/test_files/group_by.slt @@ -5634,7 +5634,7 @@ physical_plan statement ok reset datafusion.execution.batch_size; -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/information_schema.slt b/datafusion/sqllogictest/test_files/information_schema.slt index b04c78bd2774c..6947fb2397e23 100644 --- a/datafusion/sqllogictest/test_files/information_schema.slt +++ b/datafusion/sqllogictest/test_files/information_schema.slt @@ -889,7 +889,7 @@ show functions statement ok reset datafusion.catalog.information_schema; -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/insert.slt b/datafusion/sqllogictest/test_files/insert.slt index c807f73d60fe0..2d9fe2a369997 100644 --- a/datafusion/sqllogictest/test_files/insert.slt +++ b/datafusion/sqllogictest/test_files/insert.slt @@ -167,7 +167,7 @@ logical_plan 01)Dml: op=[Insert Into] table=[table_without_values] 02)--Projection: a1, a2 03)----Sort: aggregate_test_100.c1 ASC NULLS LAST -04)------Projection: sum(aggregate_test_100.c4) PARTITION BY [aggregate_test_100.c1] ORDER BY [aggregate_test_100.c9 ASC NULLS LAST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING AS a1, count(Int64(1)) PARTITION BY [aggregate_test_100.c1] ORDER BY [aggregate_test_100.c9 ASC NULLS LAST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING AS count(*) PARTITION BY [aggregate_test_100.c1] ORDER BY [aggregate_test_100.c9 ASC NULLS LAST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING AS a2, aggregate_test_100.c1 +04)------Projection: sum(aggregate_test_100.c4) PARTITION BY [aggregate_test_100.c1] ORDER BY [aggregate_test_100.c9 ASC NULLS LAST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING AS a1, count(Int64(1)) PARTITION BY [aggregate_test_100.c1] ORDER BY [aggregate_test_100.c9 ASC NULLS LAST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING AS a2, aggregate_test_100.c1 05)--------WindowAggr: windowExpr=[[sum(CAST(aggregate_test_100.c4 AS Int64)) PARTITION BY [aggregate_test_100.c1] ORDER BY [aggregate_test_100.c9 ASC NULLS LAST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING, count(Int64(1)) PARTITION BY [aggregate_test_100.c1] ORDER BY [aggregate_test_100.c9 ASC NULLS LAST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING]] 06)----------TableScan: aggregate_test_100 projection=[c1, c4, c9] physical_plan @@ -463,7 +463,7 @@ drop table unsigned_bigint_test # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/insert_to_external.slt b/datafusion/sqllogictest/test_files/insert_to_external.slt index 75476c0278c40..1ecdc1e9ad9c5 100644 --- a/datafusion/sqllogictest/test_files/insert_to_external.slt +++ b/datafusion/sqllogictest/test_files/insert_to_external.slt @@ -696,7 +696,7 @@ LOCATION 'test_files/scratch/insert_to_external/external_parquet_table_q7/'; # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/join_limit_pushdown.slt b/datafusion/sqllogictest/test_files/join_limit_pushdown.slt index ea9c971065411..933b03e7ebd93 100644 --- a/datafusion/sqllogictest/test_files/join_limit_pushdown.slt +++ b/datafusion/sqllogictest/test_files/join_limit_pushdown.slt @@ -259,7 +259,7 @@ SELECT t1.a, t2.x FROM t1 INNER JOIN t2 ON t1.a = t2.x LIMIT 100; # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/limit_single_row_batches.slt b/datafusion/sqllogictest/test_files/limit_single_row_batches.slt index 6b5368620c982..441adce9a33da 100644 --- a/datafusion/sqllogictest/test_files/limit_single_row_batches.slt +++ b/datafusion/sqllogictest/test_files/limit_single_row_batches.slt @@ -22,7 +22,7 @@ SELECT COUNT(*) FROM (SELECT i FROM filter_limit WHERE i <> 0 LIMIT 1); statement ok reset datafusion.execution.batch_size; -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/optimizer_group_by_constant.slt b/datafusion/sqllogictest/test_files/optimizer_group_by_constant.slt index da1e7de22bb7a..21be3683c1c86 100644 --- a/datafusion/sqllogictest/test_files/optimizer_group_by_constant.slt +++ b/datafusion/sqllogictest/test_files/optimizer_group_by_constant.slt @@ -119,7 +119,7 @@ logical_plan # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/parquet.slt b/datafusion/sqllogictest/test_files/parquet.slt index 781d0b00a5e4f..1088b92ad858b 100644 --- a/datafusion/sqllogictest/test_files/parquet.slt +++ b/datafusion/sqllogictest/test_files/parquet.slt @@ -889,7 +889,7 @@ WHERE b = 2; # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/parquet_sorted_statistics.slt b/datafusion/sqllogictest/test_files/parquet_sorted_statistics.slt index a4a613e383ec8..b1e76a555d7cd 100644 --- a/datafusion/sqllogictest/test_files/parquet_sorted_statistics.slt +++ b/datafusion/sqllogictest/test_files/parquet_sorted_statistics.slt @@ -278,7 +278,7 @@ physical_plan # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/projection_pushdown.slt b/datafusion/sqllogictest/test_files/projection_pushdown.slt index a40c1b8c7e246..e0067d8f245d2 100644 --- a/datafusion/sqllogictest/test_files/projection_pushdown.slt +++ b/datafusion/sqllogictest/test_files/projection_pushdown.slt @@ -637,7 +637,7 @@ SELECT id, s['value'] + 1 FROM simple_struct WHERE id > 1 ORDER BY id LIMIT 2; # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok SET datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/repartition.slt b/datafusion/sqllogictest/test_files/repartition.slt index cf913caefc525..7cec3b5844112 100644 --- a/datafusion/sqllogictest/test_files/repartition.slt +++ b/datafusion/sqllogictest/test_files/repartition.slt @@ -140,7 +140,7 @@ FROM t1 WHERE ((false > (v1 = v1)) IS DISTINCT FROM true); # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/repartition_subset_satisfaction.slt b/datafusion/sqllogictest/test_files/repartition_subset_satisfaction.slt index dbf31dec5e118..a694146d4924b 100644 --- a/datafusion/sqllogictest/test_files/repartition_subset_satisfaction.slt +++ b/datafusion/sqllogictest/test_files/repartition_subset_satisfaction.slt @@ -517,7 +517,7 @@ prod 2023-01-01T09:12:30 197.7 # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/select.slt b/datafusion/sqllogictest/test_files/select.slt index 3e97dc4588655..910fc23114082 100644 --- a/datafusion/sqllogictest/test_files/select.slt +++ b/datafusion/sqllogictest/test_files/select.slt @@ -1963,7 +1963,7 @@ SELECT COUNT(*) FROM t0 AS tt0 WHERE (4==(3/0)); # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/sort_pushdown.slt b/datafusion/sqllogictest/test_files/sort_pushdown.slt index b6c75f3977010..47178c2d6cdec 100644 --- a/datafusion/sqllogictest/test_files/sort_pushdown.slt +++ b/datafusion/sqllogictest/test_files/sort_pushdown.slt @@ -1519,7 +1519,7 @@ SELECT * FROM multi_partition_parquet ORDER BY id ASC; # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok SET datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/spark/map/str_to_map.slt b/datafusion/sqllogictest/test_files/spark/map/str_to_map.slt index 30d1672aef0ae..b8016eb1e5655 100644 --- a/datafusion/sqllogictest/test_files/spark/map/str_to_map.slt +++ b/datafusion/sqllogictest/test_files/spark/map/str_to_map.slt @@ -111,4 +111,4 @@ SELECT str_to_map(col1, col2, col3) FROM (VALUES ('a=1,b=2', ',', '='), ('x#9', ---- {a: 1, b: 2} {x: 9} -NULL \ No newline at end of file +NULL diff --git a/datafusion/sqllogictest/test_files/tpch/plans/q1.slt.part b/datafusion/sqllogictest/test_files/tpch/plans/q1.slt.part index 7e3617b1d597c..d125ba68d0729 100644 --- a/datafusion/sqllogictest/test_files/tpch/plans/q1.slt.part +++ b/datafusion/sqllogictest/test_files/tpch/plans/q1.slt.part @@ -41,7 +41,7 @@ explain select ---- logical_plan 01)Sort: lineitem.l_returnflag ASC NULLS LAST, lineitem.l_linestatus ASC NULLS LAST -02)--Projection: lineitem.l_returnflag, lineitem.l_linestatus, sum(lineitem.l_quantity) AS sum_qty, sum(lineitem.l_extendedprice) AS sum_base_price, sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount) AS sum_disc_price, sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount * Int64(1) + lineitem.l_tax) AS sum_charge, avg(lineitem.l_quantity) AS avg_qty, avg(lineitem.l_extendedprice) AS avg_price, avg(lineitem.l_discount) AS avg_disc, count(Int64(1)) AS count(*) AS count_order +02)--Projection: lineitem.l_returnflag, lineitem.l_linestatus, sum(lineitem.l_quantity) AS sum_qty, sum(lineitem.l_extendedprice) AS sum_base_price, sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount) AS sum_disc_price, sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount * Int64(1) + lineitem.l_tax) AS sum_charge, avg(lineitem.l_quantity) AS avg_qty, avg(lineitem.l_extendedprice) AS avg_price, avg(lineitem.l_discount) AS avg_disc, count(Int64(1)) AS count_order 03)----Aggregate: groupBy=[[lineitem.l_returnflag, lineitem.l_linestatus]], aggr=[[sum(lineitem.l_quantity), sum(lineitem.l_extendedprice), sum(__common_expr_1) AS sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount), sum(__common_expr_1 * (Decimal128(Some(1),20,0) + lineitem.l_tax)) AS sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount * Int64(1) + lineitem.l_tax), avg(lineitem.l_quantity), avg(lineitem.l_extendedprice), avg(lineitem.l_discount), count(Int64(1))]] 04)------Projection: lineitem.l_extendedprice * (Decimal128(Some(1),20,0) - lineitem.l_discount) AS __common_expr_1, lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus 05)--------Filter: lineitem.l_shipdate <= Date32("1998-09-02") diff --git a/datafusion/sqllogictest/test_files/tpch/plans/q13.slt.part b/datafusion/sqllogictest/test_files/tpch/plans/q13.slt.part index 94e0848bfcce1..86a1ddc315f2f 100644 --- a/datafusion/sqllogictest/test_files/tpch/plans/q13.slt.part +++ b/datafusion/sqllogictest/test_files/tpch/plans/q13.slt.part @@ -41,7 +41,7 @@ limit 10; ---- logical_plan 01)Sort: custdist DESC NULLS FIRST, c_orders.c_count DESC NULLS FIRST, fetch=10 -02)--Projection: c_orders.c_count, count(Int64(1)) AS count(*) AS custdist +02)--Projection: c_orders.c_count, count(Int64(1)) AS custdist 03)----Aggregate: groupBy=[[c_orders.c_count]], aggr=[[count(Int64(1))]] 04)------SubqueryAlias: c_orders 05)--------Projection: count(orders.o_orderkey) AS c_count diff --git a/datafusion/sqllogictest/test_files/tpch/plans/q21.slt.part b/datafusion/sqllogictest/test_files/tpch/plans/q21.slt.part index 5e9192d677532..8507201cb2d9c 100644 --- a/datafusion/sqllogictest/test_files/tpch/plans/q21.slt.part +++ b/datafusion/sqllogictest/test_files/tpch/plans/q21.slt.part @@ -59,7 +59,7 @@ order by ---- logical_plan 01)Sort: numwait DESC NULLS FIRST, supplier.s_name ASC NULLS LAST -02)--Projection: supplier.s_name, count(Int64(1)) AS count(*) AS numwait +02)--Projection: supplier.s_name, count(Int64(1)) AS numwait 03)----Aggregate: groupBy=[[supplier.s_name]], aggr=[[count(Int64(1))]] 04)------Projection: supplier.s_name 05)--------LeftAnti Join: l1.l_orderkey = __correlated_sq_2.l_orderkey Filter: __correlated_sq_2.l_suppkey != l1.l_suppkey diff --git a/datafusion/sqllogictest/test_files/tpch/plans/q22.slt.part b/datafusion/sqllogictest/test_files/tpch/plans/q22.slt.part index 3e9472e4a8867..bc5907c8d846a 100644 --- a/datafusion/sqllogictest/test_files/tpch/plans/q22.slt.part +++ b/datafusion/sqllogictest/test_files/tpch/plans/q22.slt.part @@ -57,7 +57,7 @@ order by ---- logical_plan 01)Sort: custsale.cntrycode ASC NULLS LAST -02)--Projection: custsale.cntrycode, count(Int64(1)) AS count(*) AS numcust, sum(custsale.c_acctbal) AS totacctbal +02)--Projection: custsale.cntrycode, count(Int64(1)) AS numcust, sum(custsale.c_acctbal) AS totacctbal 03)----Aggregate: groupBy=[[custsale.cntrycode]], aggr=[[count(Int64(1)), sum(custsale.c_acctbal)]] 04)------SubqueryAlias: custsale 05)--------Projection: substr(customer.c_phone, Int64(1), Int64(2)) AS cntrycode, customer.c_acctbal diff --git a/datafusion/sqllogictest/test_files/tpch/plans/q4.slt.part b/datafusion/sqllogictest/test_files/tpch/plans/q4.slt.part index 0007666f15365..6b2e5136d3762 100644 --- a/datafusion/sqllogictest/test_files/tpch/plans/q4.slt.part +++ b/datafusion/sqllogictest/test_files/tpch/plans/q4.slt.part @@ -41,7 +41,7 @@ order by ---- logical_plan 01)Sort: orders.o_orderpriority ASC NULLS LAST -02)--Projection: orders.o_orderpriority, count(Int64(1)) AS count(*) AS order_count +02)--Projection: orders.o_orderpriority, count(Int64(1)) AS order_count 03)----Aggregate: groupBy=[[orders.o_orderpriority]], aggr=[[count(Int64(1))]] 04)------Projection: orders.o_orderpriority 05)--------LeftSemi Join: orders.o_orderkey = __correlated_sq_1.l_orderkey diff --git a/datafusion/sqllogictest/test_files/type_coercion.slt b/datafusion/sqllogictest/test_files/type_coercion.slt index 7039e66b38b15..dfcbbed2b75aa 100644 --- a/datafusion/sqllogictest/test_files/type_coercion.slt +++ b/datafusion/sqllogictest/test_files/type_coercion.slt @@ -301,4 +301,4 @@ query error does not support zero arguments SELECT * FROM (SELECT 1) WHERE CAST(STARTS_WITH() AS STRING) = 'x'; query error does not support zero arguments -SELECT * FROM (SELECT 1) WHERE TRY_CAST(STARTS_WITH() AS INT) = 1; \ No newline at end of file +SELECT * FROM (SELECT 1) WHERE TRY_CAST(STARTS_WITH() AS INT) = 1; diff --git a/datafusion/sqllogictest/test_files/union.slt b/datafusion/sqllogictest/test_files/union.slt index 3871468411c4b..35c5020da7460 100644 --- a/datafusion/sqllogictest/test_files/union.slt +++ b/datafusion/sqllogictest/test_files/union.slt @@ -496,7 +496,7 @@ EXPLAIN logical_plan 01)Limit: skip=0, fetch=3 02)--Union -03)----Projection: count(Int64(1)) AS count(*) AS cnt +03)----Projection: count(Int64(1)) AS cnt 04)------Limit: skip=0, fetch=3 05)--------Aggregate: groupBy=[[]], aggr=[[count(Int64(1))]] 06)----------SubqueryAlias: a @@ -655,7 +655,7 @@ select x, y from (select 1 as x , max(10) as y) b ---- logical_plan 01)Union -02)--Projection: count(Int64(1)) AS count(*) AS count, a.n +02)--Projection: count(Int64(1)) AS count, a.n 03)----Aggregate: groupBy=[[a.n]], aggr=[[count(Int64(1))]] 04)------SubqueryAlias: a 05)--------Projection: Int64(5) AS n diff --git a/datafusion/sqllogictest/test_files/unnest.slt b/datafusion/sqllogictest/test_files/unnest.slt index ac01b7d1f7c6c..0013cc4099a86 100644 --- a/datafusion/sqllogictest/test_files/unnest.slt +++ b/datafusion/sqllogictest/test_files/unnest.slt @@ -610,7 +610,7 @@ explain select unnest(unnest(column3)), column3 from recursive_unnest_table; logical_plan 01)Projection: __unnest_placeholder(UNNEST(recursive_unnest_table.column3)).c0 AS UNNEST(recursive_unnest_table.column3).c0, __unnest_placeholder(UNNEST(recursive_unnest_table.column3)).c1 AS UNNEST(recursive_unnest_table.column3).c1, recursive_unnest_table.column3 02)--Unnest: lists[] structs[__unnest_placeholder(UNNEST(recursive_unnest_table.column3))] -03)----Projection: __unnest_placeholder(recursive_unnest_table.column3,depth=1) AS UNNEST(recursive_unnest_table.column3) AS __unnest_placeholder(UNNEST(recursive_unnest_table.column3)), recursive_unnest_table.column3 +03)----Projection: __unnest_placeholder(recursive_unnest_table.column3,depth=1) AS __unnest_placeholder(UNNEST(recursive_unnest_table.column3)), recursive_unnest_table.column3 04)------Unnest: lists[__unnest_placeholder(recursive_unnest_table.column3)|depth=1] structs[] 05)--------Projection: recursive_unnest_table.column3 AS __unnest_placeholder(recursive_unnest_table.column3), recursive_unnest_table.column3 06)----------TableScan: recursive_unnest_table projection=[column3] diff --git a/datafusion/sqllogictest/test_files/window.slt b/datafusion/sqllogictest/test_files/window.slt index caaf22f0adbd8..c8126c787b3d9 100644 --- a/datafusion/sqllogictest/test_files/window.slt +++ b/datafusion/sqllogictest/test_files/window.slt @@ -1863,7 +1863,7 @@ EXPLAIN SELECT count(*) as global_count FROM ORDER BY c1 ) AS a ---- logical_plan -01)Projection: count(Int64(1)) AS count(*) AS global_count +01)Projection: count(Int64(1)) AS global_count 02)--Aggregate: groupBy=[[]], aggr=[[count(Int64(1))]] 03)----SubqueryAlias: a 04)------Projection: @@ -6175,7 +6175,7 @@ INNER JOIN issue_20194_t2 t2 statement ok reset datafusion.execution.batch_size; -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok set datafusion.execution.target_partitions = 4; diff --git a/datafusion/sqllogictest/test_files/window_topk_pushdown.slt b/datafusion/sqllogictest/test_files/window_topk_pushdown.slt index 54e907af5cd16..20f746d1fde09 100644 --- a/datafusion/sqllogictest/test_files/window_topk_pushdown.slt +++ b/datafusion/sqllogictest/test_files/window_topk_pushdown.slt @@ -49,7 +49,7 @@ OPTIONS ('format.has_header' 'true'); # Config reset -# The SLT runner sets `target_partitions` to 4 instead of using the default, so +# The SLT runner sets `target_partitions` to 4 instead of using the default, so # reset it explicitly. statement ok SET datafusion.execution.target_partitions = 4; diff --git a/datafusion/substrait/tests/cases/emit_kind_tests.rs b/datafusion/substrait/tests/cases/emit_kind_tests.rs index 24508fd054d97..1d6cd10d95b40 100644 --- a/datafusion/substrait/tests/cases/emit_kind_tests.rs +++ b/datafusion/substrait/tests/cases/emit_kind_tests.rs @@ -58,7 +58,7 @@ mod tests { plan, // Note that duplicate references in the remap are aliased @r" - Projection: DATA.B, DATA.A AS A1, DATA.A AS DATA.A__temp__0 AS A2 + Projection: DATA.B, DATA.A AS A1, DATA.A AS A2 Filter: DATA.B = Int64(2) TableScan: DATA " diff --git a/datafusion/substrait/tests/cases/logical_plans.rs b/datafusion/substrait/tests/cases/logical_plans.rs index 663a372fe2e4f..a73cb2348a5a9 100644 --- a/datafusion/substrait/tests/cases/logical_plans.rs +++ b/datafusion/substrait/tests/cases/logical_plans.rs @@ -105,7 +105,7 @@ mod tests { assert_snapshot!( plan, @r" - Projection: row_number() ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS EXPR$0, row_number() ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS row_number() ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW__temp__0 AS ALIASED + Projection: row_number() ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS EXPR$0, row_number() ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW AS ALIASED WindowAggr: windowExpr=[[row_number() ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW]] TableScan: DATA " @@ -163,7 +163,7 @@ mod tests { assert_snapshot!( plan, @r" - Projection: left.A, left.Utf8(NULL) AS C, right.D, Utf8(NULL) AS Utf8(NULL)__temp__0 AS E + Projection: left.A, left.Utf8(NULL) AS C, right.D, Utf8(NULL) AS E Left Join: left.A = right.A SubqueryAlias: left Union diff --git a/datafusion/substrait/tests/cases/roundtrip_logical_plan.rs b/datafusion/substrait/tests/cases/roundtrip_logical_plan.rs index 1b8496c3dc729..ddbf05b567405 100644 --- a/datafusion/substrait/tests/cases/roundtrip_logical_plan.rs +++ b/datafusion/substrait/tests/cases/roundtrip_logical_plan.rs @@ -1582,7 +1582,7 @@ async fn duplicate_column() -> Result<()> { assert_snapshot!( plan, @r" - Projection: data.a + Int64(1) AS sum_a, data.a + Int64(1) AS data.a + Int64(1)__temp__0 AS sum_a_2 + Projection: data.a + Int64(1) AS sum_a, data.a + Int64(1) AS sum_a_2 Projection: data.a + Int64(1) TableScan: data projection=[a] "