You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2024/01/03 09:03:15 UTC
(spark) branch master updated: [SPARK-46563][SQL] View simpleString not follow conf spark.sql.debug.maxToStringFields
This is an automated email from the ASF dual-hosted git repository.
maxgekk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new f844e78b563d [SPARK-46563][SQL] View simpleString not follow conf spark.sql.debug.maxToStringFields
f844e78b563d is described below
commit f844e78b563dda25cbb9386335e0b601e74f9e2e
Author: Angerszhuuuu <an...@gmail.com>
AuthorDate: Wed Jan 3 12:03:00 2024 +0300
[SPARK-46563][SQL] View simpleString not follow conf spark.sql.debug.maxToStringFields
### What changes were proposed in this pull request?
View simpleString not follow conf spark.sql.debug.maxToStringFields
### Why are the changes needed?
When columns is too much, the info is noisy. View simpleString not follow conf spark.sql.debug.maxToStringFields
### Does this PR introduce _any_ user-facing change?
Yea, view's plan will follow ` spark.sql.debug.maxToStringFields`
### How was this patch tested?
No
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #44558 from AngersZhuuuu/SPARK-46563.
Authored-by: Angerszhuuuu <an...@gmail.com>
Signed-off-by: Max Gekk <ma...@gmail.com>
---
.../plans/logical/basicLogicalOperators.scala | 2 +-
.../apache/spark/sql/execution/ExistingRDD.scala | 2 +-
.../sql-tests/analyzer-results/ansi/array.sql.out | 14 +-
.../sql-tests/analyzer-results/ansi/date.sql.out | 8 +-
.../ansi/higher-order-functions.sql.out | 42 +-
.../analyzer-results/ansi/timestamp.sql.out | 2 +-
.../sql-tests/analyzer-results/array.sql.out | 14 +-
.../sql-tests/analyzer-results/bitwise.sql.out | 12 +-
.../sql-tests/analyzer-results/charvarchar.sql.out | 2 +-
.../column-resolution-aggregate.sql.out | 10 +-
.../column-resolution-sort.sql.out | 8 +-
.../sql-tests/analyzer-results/count.sql.out | 22 +-
.../sql-tests/analyzer-results/cross-join.sql.out | 48 +-
.../sql-tests/analyzer-results/date.sql.out | 4 +-
.../analyzer-results/datetime-legacy.sql.out | 6 +-
.../decimalArithmeticOperations.sql.out | 6 +-
.../sql-tests/analyzer-results/except-all.sql.out | 72 +--
.../sql-tests/analyzer-results/except.sql.out | 40 +-
.../analyzer-results/execute-immediate.sql.out | 38 +-
.../sql-tests/analyzer-results/extract.sql.out | 192 ++++----
.../analyzer-results/group-analytics.sql.out | 84 ++--
.../analyzer-results/group-by-all-duckdb.sql.out | 10 +-
.../analyzer-results/group-by-all-mosha.sql.out | 14 +-
.../analyzer-results/group-by-all.sql.out | 42 +-
.../analyzer-results/group-by-filter.sql.out | 126 +++---
.../analyzer-results/group-by-ordinal.sql.out | 36 +-
.../sql-tests/analyzer-results/group-by.sql.out | 70 +--
.../analyzer-results/grouping_set.sql.out | 8 +-
.../sql-tests/analyzer-results/having.sql.out | 10 +-
.../higher-order-functions.sql.out | 42 +-
.../sql-tests/analyzer-results/ilike-all.sql.out | 24 +-
.../sql-tests/analyzer-results/ilike-any.sql.out | 24 +-
.../sql-tests/analyzer-results/inner-join.sql.out | 4 +-
.../analyzer-results/intersect-all.sql.out | 84 ++--
.../analyzer-results/join-lateral.sql.out | 482 ++++++++++-----------
.../analyzer-results/json-functions.sql.out | 2 +-
.../sql-tests/analyzer-results/like-all.sql.out | 24 +-
.../sql-tests/analyzer-results/like-any.sql.out | 24 +-
.../analyzer-results/linear-regression.sql.out | 64 +--
.../sql-tests/analyzer-results/mode.sql.out | 24 +-
.../named-function-arguments.sql.out | 6 +-
.../analyzer-results/natural-join.sql.out | 118 ++---
.../analyzer-results/order-by-all.sql.out | 32 +-
.../analyzer-results/order-by-ordinal.sql.out | 14 +-
.../sql-tests/analyzer-results/outer-join.sql.out | 2 +-
.../sql-tests/analyzer-results/percentiles.sql.out | 36 +-
.../sql-tests/analyzer-results/pivot.sql.out | 62 +--
.../postgreSQL/aggregates_part1.sql.out | 8 +-
.../postgreSQL/aggregates_part2.sql.out | 22 +-
.../postgreSQL/create_view.sql.out | 8 +-
.../postgreSQL/groupingsets.sql.out | 22 +-
.../analyzer-results/postgreSQL/join.sql.out | 176 ++++----
.../analyzer-results/postgreSQL/select.sql.out | 24 +-
.../postgreSQL/select_distinct.sql.out | 8 +-
.../analyzer-results/postgreSQL/union.sql.out | 90 ++--
.../postgreSQL/window_part1.sql.out | 2 +-
.../postgreSQL/window_part3.sql.out | 2 +-
.../analyzer-results/pred-pushdown.sql.out | 4 +-
.../analyzer-results/query_regex_column.sql.out | 44 +-
.../analyzer-results/selectExcept.sql.out | 26 +-
.../sql-compatibility-functions.sql.out | 2 +-
.../sql-tests/analyzer-results/struct.sql.out | 12 +-
.../analyzer-results/subexp-elimination.sql.out | 10 +-
.../exists-subquery/exists-aggregate.sql.out | 46 +-
.../subquery/exists-subquery/exists-basic.sql.out | 42 +-
.../exists-subquery/exists-count-bug.sql.out | 60 +--
.../subquery/exists-subquery/exists-cte.sql.out | 34 +-
.../subquery/exists-subquery/exists-having.sql.out | 28 +-
.../exists-in-join-condition.sql.out | 264 +++++------
.../exists-joins-and-set-ops.sql.out | 144 +++---
.../exists-subquery/exists-orderby-limit.sql.out | 96 ++--
.../exists-subquery/exists-outside-filter.sql.out | 54 +--
.../exists-subquery/exists-within-and-or.sql.out | 26 +-
.../subquery/in-subquery/in-basic.sql.out | 8 +-
.../subquery/in-subquery/in-count-bug.sql.out | 78 ++--
.../subquery/in-subquery/in-group-by.sql.out | 84 ++--
.../subquery/in-subquery/in-having.sql.out | 38 +-
.../subquery/in-subquery/in-joins.sql.out | 102 ++---
.../subquery/in-subquery/in-limit.sql.out | 92 ++--
.../in-subquery/in-multiple-columns.sql.out | 32 +-
.../subquery/in-subquery/in-order-by.sql.out | 64 +--
.../subquery/in-subquery/in-set-operations.sql.out | 240 +++++-----
.../in-subquery-in-join-condition.sql.out | 240 +++++-----
.../subquery/in-subquery/in-with-cte.sql.out | 56 +--
.../subquery/in-subquery/nested-not-in.sql.out | 66 +--
.../subquery/in-subquery/not-in-group-by.sql.out | 24 +-
.../subquery/in-subquery/not-in-joins.sql.out | 50 +--
.../not-in-unit-tests-multi-column-literal.sql.out | 6 +-
.../not-in-unit-tests-multi-column.sql.out | 28 +-
...not-in-unit-tests-single-column-literal.sql.out | 8 +-
.../not-in-unit-tests-single-column.sql.out | 32 +-
.../subquery/in-subquery/simple-in.sql.out | 40 +-
.../nested-scalar-subquery-count-bug.sql.out | 20 +-
.../scalar-subquery-count-bug.sql.out | 40 +-
.../scalar-subquery-predicate.sql.out | 236 +++++-----
.../scalar-subquery/scalar-subquery-select.sql.out | 140 +++---
.../scalar-subquery/scalar-subquery-set-op.sql.out | 308 ++++++-------
.../subquery/subquery-offset.sql.out | 4 +-
.../analyzer-results/table-aliases.sql.out | 14 +-
.../sql-tests/analyzer-results/timestamp.sql.out | 2 +-
.../timestampNTZ/timestamp-ansi.sql.out | 2 +-
.../timestampNTZ/timestamp.sql.out | 2 +-
.../sql-tests/analyzer-results/transform.sql.out | 74 ++--
.../typeCoercion/native/concat.sql.out | 4 +-
.../typeCoercion/native/mapZipWith.sql.out | 30 +-
.../typeCoercion/native/mapconcat.sql.out | 4 +-
.../udf/postgreSQL/udf-aggregates_part1.sql.out | 8 +-
.../udf/postgreSQL/udf-aggregates_part2.sql.out | 14 +-
.../udf/postgreSQL/udf-join.sql.out | 164 +++----
.../analyzer-results/udf/udf-count.sql.out | 8 +-
.../analyzer-results/udf/udf-cross-join.sql.out | 48 +-
.../analyzer-results/udf/udf-except-all.sql.out | 72 +--
.../analyzer-results/udf/udf-except.sql.out | 40 +-
.../udf/udf-group-analytics.sql.out | 42 +-
.../analyzer-results/udf/udf-group-by.sql.out | 62 +--
.../analyzer-results/udf/udf-having.sql.out | 6 +-
.../analyzer-results/udf/udf-inner-join.sql.out | 4 +-
.../analyzer-results/udf/udf-intersect-all.sql.out | 84 ++--
.../analyzer-results/udf/udf-natural-join.sql.out | 16 +-
.../analyzer-results/udf/udf-outer-join.sql.out | 2 +-
.../analyzer-results/udf/udf-pivot.sql.out | 54 +--
.../analyzer-results/udf/udf-union.sql.out | 10 +-
.../analyzer-results/udf/udf-window.sql.out | 28 +-
.../sql-tests/analyzer-results/udtf/udtf.sql.out | 2 +-
.../sql-tests/analyzer-results/union.sql.out | 10 +-
.../sql-tests/analyzer-results/unpivot.sql.out | 12 +-
.../sql-tests/analyzer-results/using-join.sql.out | 152 +++----
.../sql-tests/analyzer-results/window.sql.out | 92 ++--
.../sql-tests/results/join-lateral.sql.out | 6 +-
.../exists-subquery/exists-orderby-limit.sql.out | 4 +-
.../results/subquery/in-subquery/in-limit.sql.out | 12 +-
.../results/subquery/subquery-offset.sql.out | 4 +-
.../resources/sql-tests/results/udtf/udtf.sql.out | 2 +-
133 files changed, 3196 insertions(+), 3196 deletions(-)
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
index 497f485b67fe..fbbae16130c0 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
@@ -736,7 +736,7 @@ case class View(
override def metadataOutput: Seq[Attribute] = Nil
override def simpleString(maxFields: Int): String = {
- s"View (${desc.identifier}, ${output.mkString("[", ",", "]")})"
+ s"View (${desc.identifier}, ${truncatedString(output, "[", ", ", "]", maxFields)})"
}
override def doCanonicalize(): LogicalPlan = child match {
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala
index 3dcf0efaadd8..7ade47d7e3f1 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala
@@ -81,7 +81,7 @@ case class ExternalRDDScanExec[T](
}
override def simpleString(maxFields: Int): String = {
- s"$nodeName${output.mkString("[", ",", "]")}"
+ s"$nodeName${truncatedString(output, "[", ", ", "]", maxFields)}"
}
}
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/array.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/array.sql.out
index 6fc308157933..f4fd42d6adea 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/array.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/array.sql.out
@@ -19,7 +19,7 @@ select * from data
-- !query analysis
Project [a#x, b#x, c#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x,c#x])
+ +- View (`data`, [a#x, b#x, c#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as array<int>) AS b#x, cast(c#x as array<array<int>>) AS c#x]
+- Project [a#x, b#x, c#x]
+- SubqueryAlias data
@@ -31,7 +31,7 @@ select a, b[0], b[0] + b[1] from data
-- !query analysis
Project [a#x, b#x[0] AS b[0]#x, (b#x[0] + b#x[1]) AS (b[0] + b[1])#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x,c#x])
+ +- View (`data`, [a#x, b#x, c#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as array<int>) AS b#x, cast(c#x as array<array<int>>) AS c#x]
+- Project [a#x, b#x, c#x]
+- SubqueryAlias data
@@ -43,7 +43,7 @@ select a, c[0][0] + c[0][0 + 1] from data
-- !query analysis
Project [a#x, (c#x[0][0] + c#x[0][(0 + 1)]) AS (c[0][0] + c[0][(0 + 1)])#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x,c#x])
+ +- View (`data`, [a#x, b#x, c#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as array<int>) AS b#x, cast(c#x as array<array<int>>) AS c#x]
+- Project [a#x, b#x, c#x]
+- SubqueryAlias data
@@ -108,7 +108,7 @@ select * from primitive_arrays
-- !query analysis
Project [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x]
+- SubqueryAlias primitive_arrays
- +- View (`primitive_arrays`, [boolean_array#x,tinyint_array#x,smallint_array#x,int_array#x,bigint_array#x,decimal_array#x,double_array#x,float_array#x,date_array#x,timestamp_array#x])
+ +- View (`primitive_arrays`, [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x])
+- Project [cast(boolean_array#x as array<boolean>) AS boolean_array#x, cast(tinyint_array#x as array<tinyint>) AS tinyint_array#x, cast(smallint_array#x as array<smallint>) AS smallint_array#x, cast(int_array#x as array<int>) AS int_array#x, cast(bigint_array#x as array<bigint>) AS bigint_array#x, cast(decimal_array#x as array<decimal(19,0)>) AS decimal_array#x, cast(double_array#x as array<double>) AS double_array#x, cast(float_array#x as array<float>) AS float_array#x, cast(date [...]
+- Project [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x]
+- SubqueryAlias primitive_arrays
@@ -137,7 +137,7 @@ select array_contains(b, 11), array_contains(c, array(111, 112, 113)) from data
-- !query analysis
Project [array_contains(b#x, 11) AS array_contains(b, 11)#x, array_contains(c#x, array(111, 112, 113)) AS array_contains(c, array(111, 112, 113))#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x,c#x])
+ +- View (`data`, [a#x, b#x, c#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as array<int>) AS b#x, cast(c#x as array<array<int>>) AS c#x]
+- Project [a#x, b#x, c#x]
+- SubqueryAlias data
@@ -160,7 +160,7 @@ from primitive_arrays
-- !query analysis
Project [sort_array(boolean_array#x, true) AS sort_array(boolean_array, true)#x, sort_array(tinyint_array#x, true) AS sort_array(tinyint_array, true)#x, sort_array(smallint_array#x, true) AS sort_array(smallint_array, true)#x, sort_array(int_array#x, true) AS sort_array(int_array, true)#x, sort_array(bigint_array#x, true) AS sort_array(bigint_array, true)#x, sort_array(decimal_array#x, true) AS sort_array(decimal_array, true)#x, sort_array(double_array#x, true) AS sort_array(double_array [...]
+- SubqueryAlias primitive_arrays
- +- View (`primitive_arrays`, [boolean_array#x,tinyint_array#x,smallint_array#x,int_array#x,bigint_array#x,decimal_array#x,double_array#x,float_array#x,date_array#x,timestamp_array#x])
+ +- View (`primitive_arrays`, [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x])
+- Project [cast(boolean_array#x as array<boolean>) AS boolean_array#x, cast(tinyint_array#x as array<tinyint>) AS tinyint_array#x, cast(smallint_array#x as array<smallint>) AS smallint_array#x, cast(int_array#x as array<int>) AS int_array#x, cast(bigint_array#x as array<bigint>) AS bigint_array#x, cast(decimal_array#x as array<decimal(19,0)>) AS decimal_array#x, cast(double_array#x as array<double>) AS double_array#x, cast(float_array#x as array<float>) AS float_array#x, cast(date [...]
+- Project [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x]
+- SubqueryAlias primitive_arrays
@@ -231,7 +231,7 @@ from primitive_arrays
-- !query analysis
Project [size(boolean_array#x, false) AS size(boolean_array)#x, size(tinyint_array#x, false) AS size(tinyint_array)#x, size(smallint_array#x, false) AS size(smallint_array)#x, size(int_array#x, false) AS size(int_array)#x, size(bigint_array#x, false) AS size(bigint_array)#x, size(decimal_array#x, false) AS size(decimal_array)#x, size(double_array#x, false) AS size(double_array)#x, size(float_array#x, false) AS size(float_array)#x, size(date_array#x, false) AS size(date_array)#x, size(tim [...]
+- SubqueryAlias primitive_arrays
- +- View (`primitive_arrays`, [boolean_array#x,tinyint_array#x,smallint_array#x,int_array#x,bigint_array#x,decimal_array#x,double_array#x,float_array#x,date_array#x,timestamp_array#x])
+ +- View (`primitive_arrays`, [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x])
+- Project [cast(boolean_array#x as array<boolean>) AS boolean_array#x, cast(tinyint_array#x as array<tinyint>) AS tinyint_array#x, cast(smallint_array#x as array<smallint>) AS smallint_array#x, cast(int_array#x as array<int>) AS int_array#x, cast(bigint_array#x as array<bigint>) AS bigint_array#x, cast(decimal_array#x as array<decimal(19,0)>) AS decimal_array#x, cast(double_array#x as array<double>) AS double_array#x, cast(float_array#x as array<float>) AS float_array#x, cast(date [...]
+- Project [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x]
+- SubqueryAlias primitive_arrays
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/date.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/date.sql.out
index 4373f53dddf8..c231f3997b05 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/date.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/date.sql.out
@@ -532,7 +532,7 @@ select date_add('2011-11-11', int_str) from date_view
-- !query analysis
Project [date_add(cast(2011-11-11 as date), cast(int_str#x as int)) AS date_add(2011-11-11, int_str)#x]
+- SubqueryAlias date_view
- +- View (`date_view`, [date_str#x,int_str#x])
+ +- View (`date_view`, [date_str#x, int_str#x])
+- Project [cast(date_str#x as string) AS date_str#x, cast(int_str#x as string) AS int_str#x]
+- Project [2011-11-11 AS date_str#x, 1 AS int_str#x]
+- OneRowRelation
@@ -543,7 +543,7 @@ select date_sub('2011-11-11', int_str) from date_view
-- !query analysis
Project [date_sub(cast(2011-11-11 as date), cast(int_str#x as int)) AS date_sub(2011-11-11, int_str)#x]
+- SubqueryAlias date_view
- +- View (`date_view`, [date_str#x,int_str#x])
+ +- View (`date_view`, [date_str#x, int_str#x])
+- Project [cast(date_str#x as string) AS date_str#x, cast(int_str#x as string) AS int_str#x]
+- Project [2011-11-11 AS date_str#x, 1 AS int_str#x]
+- OneRowRelation
@@ -554,7 +554,7 @@ select date_add(date_str, 1) from date_view
-- !query analysis
Project [date_add(cast(date_str#x as date), 1) AS date_add(date_str, 1)#x]
+- SubqueryAlias date_view
- +- View (`date_view`, [date_str#x,int_str#x])
+ +- View (`date_view`, [date_str#x, int_str#x])
+- Project [cast(date_str#x as string) AS date_str#x, cast(int_str#x as string) AS int_str#x]
+- Project [2011-11-11 AS date_str#x, 1 AS int_str#x]
+- OneRowRelation
@@ -565,7 +565,7 @@ select date_sub(date_str, 1) from date_view
-- !query analysis
Project [date_sub(cast(date_str#x as date), 1) AS date_sub(date_str, 1)#x]
+- SubqueryAlias date_view
- +- View (`date_view`, [date_str#x,int_str#x])
+ +- View (`date_view`, [date_str#x, int_str#x])
+- Project [cast(date_str#x as string) AS date_str#x, cast(int_str#x as string) AS int_str#x]
+- Project [2011-11-11 AS date_str#x, 1 AS int_str#x]
+- OneRowRelation
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/higher-order-functions.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/higher-order-functions.sql.out
index e725b2b7b6a0..693cb2a04631 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/higher-order-functions.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/higher-order-functions.sql.out
@@ -40,7 +40,7 @@ select transform(zs, z -> z) as v from nested
-- !query analysis
Project [transform(zs#x, lambdafunction(lambda z#x, lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -51,7 +51,7 @@ select transform(ys, y -> y * y) as v from nested
-- !query analysis
Project [transform(ys#x, lambdafunction((lambda y#x * lambda y#x), lambda y#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -62,7 +62,7 @@ select transform(ys, (y, i) -> y + i) as v from nested
-- !query analysis
Project [transform(ys#x, lambdafunction((lambda y#x + lambda i#x), lambda y#x, lambda i#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -73,7 +73,7 @@ select transform(zs, z -> concat(ys, z)) as v from nested
-- !query analysis
Project [transform(zs#x, lambdafunction(concat(ys#x, lambda z#x), lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -84,7 +84,7 @@ select transform(ys, 0) as v from nested
-- !query analysis
Project [transform(ys#x, lambdafunction(0, lambda col0#x, true)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -102,7 +102,7 @@ select filter(ys, y -> y > 30) as v from nested
-- !query analysis
Project [filter(ys#x, lambdafunction((lambda y#x > 30), lambda y#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -120,7 +120,7 @@ select transform(zs, z -> filter(z, zz -> zz > 50)) as v from nested
-- !query analysis
Project [transform(zs#x, lambdafunction(filter(lambda z#x, lambdafunction((lambda zz#x > 50), lambda zz#x, false)), lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -131,7 +131,7 @@ select aggregate(ys, 0, (y, a) -> y + a + x) as v from nested
-- !query analysis
Project [aggregate(ys#x, 0, lambdafunction(((lambda y#x + lambda a#x) + x#x), lambda y#x, lambda a#x, false), lambdafunction(lambda id#x, lambda id#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -142,7 +142,7 @@ select aggregate(ys, (0 as sum, 0 as n), (acc, x) -> (acc.sum + x, acc.n + 1), a
-- !query analysis
Project [aggregate(ys#x, named_struct(sum, 0, n, 0), lambdafunction(named_struct(col1, (lambda acc#x.sum + lambda x#x), col2, (lambda acc#x.n + 1)), lambda acc#x, lambda x#x, false), lambdafunction((cast(lambda acc#x.sum as double) / cast(lambda acc#x.n as double)), lambda acc#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -153,7 +153,7 @@ select transform(zs, z -> aggregate(z, 1, (acc, val) -> acc * val * size(z))) as
-- !query analysis
Project [transform(zs#x, lambdafunction(aggregate(lambda z#x, 1, lambdafunction(((lambda acc#x * lambda val#x) * size(lambda z#x, false)), lambda acc#x, lambda val#x, false), lambdafunction(lambda id#x, lambda id#x, false)), lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -171,7 +171,7 @@ select reduce(ys, 0, (y, a) -> y + a + x) as v from nested
-- !query analysis
Project [reduce(ys#x, 0, lambdafunction(((lambda y#x + lambda a#x) + x#x), lambda y#x, lambda a#x, false), lambdafunction(lambda id#x, lambda id#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -182,7 +182,7 @@ select reduce(ys, (0 as sum, 0 as n), (acc, x) -> (acc.sum + x, acc.n + 1), acc
-- !query analysis
Project [reduce(ys#x, named_struct(sum, 0, n, 0), lambdafunction(named_struct(col1, (lambda acc#x.sum + lambda x#x), col2, (lambda acc#x.n + 1)), lambda acc#x, lambda x#x, false), lambdafunction((cast(lambda acc#x.sum as double) / cast(lambda acc#x.n as double)), lambda acc#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -193,7 +193,7 @@ select transform(zs, z -> reduce(z, 1, (acc, val) -> acc * val * size(z))) as v
-- !query analysis
Project [transform(zs#x, lambdafunction(reduce(lambda z#x, 1, lambdafunction(((lambda acc#x * lambda val#x) * size(lambda z#x, false)), lambda acc#x, lambda val#x, false), lambdafunction(lambda id#x, lambda id#x, false)), lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -211,7 +211,7 @@ select exists(ys, y -> y > 30) as v from nested
-- !query analysis
Project [exists(ys#x, lambdafunction((lambda y#x > 30), lambda y#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -229,7 +229,7 @@ select zip_with(ys, zs, (a, b) -> a + size(b)) as v from nested
-- !query analysis
Project [zip_with(ys#x, zs#x, lambdafunction((lambda a#x + size(lambda b#x, false)), lambda a#x, lambda b#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -268,7 +268,7 @@ select transform_keys(ys, (k, v) -> k) as v from nested
-- !query analysis
Project [transform_keys(ys#x, lambdafunction(lambda k#x, lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -279,7 +279,7 @@ select transform_keys(ys, (k, v) -> k + 1) as v from nested
-- !query analysis
Project [transform_keys(ys#x, lambdafunction((lambda k#x + 1), lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -290,7 +290,7 @@ select transform_keys(ys, (k, v) -> k + v) as v from nested
-- !query analysis
Project [transform_keys(ys#x, lambdafunction((lambda k#x + lambda v#x), lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -301,7 +301,7 @@ select transform_values(ys, (k, v) -> v) as v from nested
-- !query analysis
Project [transform_values(ys#x, lambdafunction(lambda v#x, lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -312,7 +312,7 @@ select transform_values(ys, (k, v) -> v + 1) as v from nested
-- !query analysis
Project [transform_values(ys#x, lambdafunction((lambda v#x + 1), lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -323,7 +323,7 @@ select transform_values(ys, (k, v) -> k + v) as v from nested
-- !query analysis
Project [transform_values(ys#x, lambdafunction((lambda k#x + lambda v#x), lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/timestamp.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/timestamp.sql.out
index 49e160a6cd4b..ecfc286b7943 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/timestamp.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/ansi/timestamp.sql.out
@@ -247,7 +247,7 @@ select typeof(current_date), typeof(current_timestamp) from ttf1
-- !query analysis
Project [typeof(current_date#x) AS typeof(current_date)#x, typeof(current_timestamp#x) AS typeof(current_timestamp)#x]
+- SubqueryAlias ttf1
- +- View (`ttf1`, [current_date#x,current_timestamp#x])
+ +- View (`ttf1`, [current_date#x, current_timestamp#x])
+- Project [cast(current_date#x as int) AS current_date#x, cast(current_timestamp#x as int) AS current_timestamp#x]
+- Project [current_date#x, current_timestamp#x]
+- SubqueryAlias ttf1
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/array.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/array.sql.out
index e0585b77cb6b..c26bb210b0ff 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/array.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/array.sql.out
@@ -19,7 +19,7 @@ select * from data
-- !query analysis
Project [a#x, b#x, c#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x,c#x])
+ +- View (`data`, [a#x, b#x, c#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as array<int>) AS b#x, cast(c#x as array<array<int>>) AS c#x]
+- Project [a#x, b#x, c#x]
+- SubqueryAlias data
@@ -31,7 +31,7 @@ select a, b[0], b[0] + b[1] from data
-- !query analysis
Project [a#x, b#x[0] AS b[0]#x, (b#x[0] + b#x[1]) AS (b[0] + b[1])#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x,c#x])
+ +- View (`data`, [a#x, b#x, c#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as array<int>) AS b#x, cast(c#x as array<array<int>>) AS c#x]
+- Project [a#x, b#x, c#x]
+- SubqueryAlias data
@@ -43,7 +43,7 @@ select a, c[0][0] + c[0][0 + 1] from data
-- !query analysis
Project [a#x, (c#x[0][0] + c#x[0][(0 + 1)]) AS (c[0][0] + c[0][(0 + 1)])#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x,c#x])
+ +- View (`data`, [a#x, b#x, c#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as array<int>) AS b#x, cast(c#x as array<array<int>>) AS c#x]
+- Project [a#x, b#x, c#x]
+- SubqueryAlias data
@@ -108,7 +108,7 @@ select * from primitive_arrays
-- !query analysis
Project [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x]
+- SubqueryAlias primitive_arrays
- +- View (`primitive_arrays`, [boolean_array#x,tinyint_array#x,smallint_array#x,int_array#x,bigint_array#x,decimal_array#x,double_array#x,float_array#x,date_array#x,timestamp_array#x])
+ +- View (`primitive_arrays`, [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x])
+- Project [cast(boolean_array#x as array<boolean>) AS boolean_array#x, cast(tinyint_array#x as array<tinyint>) AS tinyint_array#x, cast(smallint_array#x as array<smallint>) AS smallint_array#x, cast(int_array#x as array<int>) AS int_array#x, cast(bigint_array#x as array<bigint>) AS bigint_array#x, cast(decimal_array#x as array<decimal(19,0)>) AS decimal_array#x, cast(double_array#x as array<double>) AS double_array#x, cast(float_array#x as array<float>) AS float_array#x, cast(date [...]
+- Project [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x]
+- SubqueryAlias primitive_arrays
@@ -137,7 +137,7 @@ select array_contains(b, 11), array_contains(c, array(111, 112, 113)) from data
-- !query analysis
Project [array_contains(b#x, 11) AS array_contains(b, 11)#x, array_contains(c#x, array(111, 112, 113)) AS array_contains(c, array(111, 112, 113))#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x,c#x])
+ +- View (`data`, [a#x, b#x, c#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as array<int>) AS b#x, cast(c#x as array<array<int>>) AS c#x]
+- Project [a#x, b#x, c#x]
+- SubqueryAlias data
@@ -160,7 +160,7 @@ from primitive_arrays
-- !query analysis
Project [sort_array(boolean_array#x, true) AS sort_array(boolean_array, true)#x, sort_array(tinyint_array#x, true) AS sort_array(tinyint_array, true)#x, sort_array(smallint_array#x, true) AS sort_array(smallint_array, true)#x, sort_array(int_array#x, true) AS sort_array(int_array, true)#x, sort_array(bigint_array#x, true) AS sort_array(bigint_array, true)#x, sort_array(decimal_array#x, true) AS sort_array(decimal_array, true)#x, sort_array(double_array#x, true) AS sort_array(double_array [...]
+- SubqueryAlias primitive_arrays
- +- View (`primitive_arrays`, [boolean_array#x,tinyint_array#x,smallint_array#x,int_array#x,bigint_array#x,decimal_array#x,double_array#x,float_array#x,date_array#x,timestamp_array#x])
+ +- View (`primitive_arrays`, [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x])
+- Project [cast(boolean_array#x as array<boolean>) AS boolean_array#x, cast(tinyint_array#x as array<tinyint>) AS tinyint_array#x, cast(smallint_array#x as array<smallint>) AS smallint_array#x, cast(int_array#x as array<int>) AS int_array#x, cast(bigint_array#x as array<bigint>) AS bigint_array#x, cast(decimal_array#x as array<decimal(19,0)>) AS decimal_array#x, cast(double_array#x as array<double>) AS double_array#x, cast(float_array#x as array<float>) AS float_array#x, cast(date [...]
+- Project [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x]
+- SubqueryAlias primitive_arrays
@@ -231,7 +231,7 @@ from primitive_arrays
-- !query analysis
Project [size(boolean_array#x, true) AS size(boolean_array)#x, size(tinyint_array#x, true) AS size(tinyint_array)#x, size(smallint_array#x, true) AS size(smallint_array)#x, size(int_array#x, true) AS size(int_array)#x, size(bigint_array#x, true) AS size(bigint_array)#x, size(decimal_array#x, true) AS size(decimal_array)#x, size(double_array#x, true) AS size(double_array)#x, size(float_array#x, true) AS size(float_array)#x, size(date_array#x, true) AS size(date_array)#x, size(timestamp_ar [...]
+- SubqueryAlias primitive_arrays
- +- View (`primitive_arrays`, [boolean_array#x,tinyint_array#x,smallint_array#x,int_array#x,bigint_array#x,decimal_array#x,double_array#x,float_array#x,date_array#x,timestamp_array#x])
+ +- View (`primitive_arrays`, [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x])
+- Project [cast(boolean_array#x as array<boolean>) AS boolean_array#x, cast(tinyint_array#x as array<tinyint>) AS tinyint_array#x, cast(smallint_array#x as array<smallint>) AS smallint_array#x, cast(int_array#x as array<int>) AS int_array#x, cast(bigint_array#x as array<bigint>) AS bigint_array#x, cast(decimal_array#x as array<decimal(19,0)>) AS decimal_array#x, cast(double_array#x as array<double>) AS double_array#x, cast(float_array#x as array<float>) AS float_array#x, cast(date [...]
+- Project [boolean_array#x, tinyint_array#x, smallint_array#x, int_array#x, bigint_array#x, decimal_array#x, double_array#x, float_array#x, date_array#x, timestamp_array#x]
+- SubqueryAlias primitive_arrays
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/bitwise.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/bitwise.sql.out
index 96a0000f4f77..086622789d43 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/bitwise.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/bitwise.sql.out
@@ -194,7 +194,7 @@ SELECT BIT_XOR(b3) AS n1 FROM bitwise_test where 1 = 0
Aggregate [bit_xor(b3#x) AS n1#x]
+- Filter (1 = 0)
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -207,7 +207,7 @@ SELECT BIT_XOR(b4) AS n1 FROM bitwise_test where b4 is null
Aggregate [bit_xor(b4#xL) AS n1#xL]
+- Filter isnull(b4#xL)
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -225,7 +225,7 @@ FROM bitwise_test
-- !query analysis
Aggregate [bit_xor(cast(b1#x as tinyint)) AS a4#x, bit_xor(cast(b2#x as smallint)) AS b5#x, bit_xor(b3#x) AS c2#x, bit_xor(b4#xL) AS d2#xL, bit_xor(distinct b4#xL) AS e2#xL]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -237,7 +237,7 @@ SELECT bit_xor(b3) FROM bitwise_test GROUP BY b1 & 1
-- !query analysis
Aggregate [(b1#x & 1)], [bit_xor(b3#x) AS bit_xor(b3)#x]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -251,7 +251,7 @@ Project [b1#x, bit_xor(b2)#x]
+- Filter (bit_and(b2#x)#x < 7)
+- Aggregate [b1#x], [b1#x, bit_xor(b2#x) AS bit_xor(b2)#x, bit_and(b2#x) AS bit_and(b2#x)#x]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -266,7 +266,7 @@ Project [b1#x, b2#x, bit_xor(b2) OVER (PARTITION BY b1 ORDER BY b2 ASC NULLS FIR
+- Window [bit_xor(b2#x) windowspecdefinition(b1#x, b2#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS bit_xor(b2) OVER (PARTITION BY b1 ORDER BY b2 ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [b1#x], [b2#x ASC NULLS FIRST]
+- Project [b1#x, b2#x]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/charvarchar.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/charvarchar.sql.out
index 02e1816280c5..4f556d6dbc0b 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/charvarchar.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/charvarchar.sql.out
@@ -360,7 +360,7 @@ InsertIntoHadoopFsRelationCommand file:[not included in comparison]/{warehouse_d
+- Project [staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, charTypeWriteSideCheck, cast(c#x as string), 7, true, false, true) AS c7#x, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, charTypeWriteSideCheck, cast(c#x as string), 8, true, false, true) AS c8#x, staticinvoke(class org.apache.spark.sql.catalyst.util.CharVarcharCodegenUtils, StringType, varcharTypeWriteSideCheck, cast(v#x as string), 6, true [...]
+- Project [c#x, c#x, v#x, c#x]
+- SubqueryAlias str_view
- +- View (`str_view`, [c#x,v#x])
+ +- View (`str_view`, [c#x, v#x])
+- Project [cast(c#x as string) AS c#x, cast(v#x as string) AS v#x]
+- Project [c#x, v#x]
+- SubqueryAlias t
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/column-resolution-aggregate.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/column-resolution-aggregate.sql.out
index 0c213899b64e..39ab8aa835c4 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/column-resolution-aggregate.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/column-resolution-aggregate.sql.out
@@ -38,12 +38,12 @@ Project [a#x]
: +- Project [max((x + 10))#x, max((x + 10))#x AS a#x]
: +- Aggregate [max((x#x + 10)) AS max((x + 10))#x]
: +- SubqueryAlias v2
- : +- View (`v2`, [x#x,y#x,all#x])
+ : +- View (`v2`, [x#x, y#x, all#x])
: +- Project [cast(x#x as int) AS x#x, cast(y#x as int) AS y#x, cast(all#x as int) AS all#x]
: +- SubqueryAlias t
: +- LocalRelation [x#x, y#x, all#x]
+- SubqueryAlias v1
- +- View (`v1`, [a#x,b#x,k#x])
+ +- View (`v1`, [a#x, b#x, k#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x, cast(k#x as int) AS k#x]
+- SubqueryAlias t
+- LocalRelation [a#x, b#x, k#x]
@@ -118,7 +118,7 @@ Project [lca#x, (lca#x + 1) AS col#x]
+- Project [k#x, k#x AS lca#x]
+- Aggregate [k#x], [k#x]
+- SubqueryAlias v1
- +- View (`v1`, [a#x,b#x,k#x])
+ +- View (`v1`, [a#x, b#x, k#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x, cast(k#x as int) AS k#x]
+- SubqueryAlias t
+- LocalRelation [a#x, b#x, k#x]
@@ -131,12 +131,12 @@ Project [x#x, y#x, all#x]
+- Filter exists#x []
: +- Aggregate [a#x, b#x], [a#x, b#x]
: +- SubqueryAlias v1
- : +- View (`v1`, [a#x,b#x,k#x])
+ : +- View (`v1`, [a#x, b#x, k#x])
: +- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x, cast(k#x as int) AS k#x]
: +- SubqueryAlias t
: +- LocalRelation [a#x, b#x, k#x]
+- SubqueryAlias v2
- +- View (`v2`, [x#x,y#x,all#x])
+ +- View (`v2`, [x#x, y#x, all#x])
+- Project [cast(x#x as int) AS x#x, cast(y#x as int) AS y#x, cast(all#x as int) AS all#x]
+- SubqueryAlias t
+- LocalRelation [x#x, y#x, all#x]
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/column-resolution-sort.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/column-resolution-sort.sql.out
index a6141f7b579b..e4f6a5935dc6 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/column-resolution-sort.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/column-resolution-sort.sql.out
@@ -21,7 +21,7 @@ SELECT max(a) AS b FROM v1 GROUP BY k ORDER BY b
Sort [b#x ASC NULLS FIRST], true
+- Aggregate [k#x], [max(a#x) AS b#x]
+- SubqueryAlias v1
- +- View (`v1`, [a#x,b#x,k#x])
+ +- View (`v1`, [a#x, b#x, k#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x, cast(k#x as int) AS k#x]
+- SubqueryAlias t
+- LocalRelation [a#x, b#x, k#x]
@@ -34,7 +34,7 @@ Project [max(a)#x]
+- Sort [all#x ASC NULLS FIRST], true
+- Aggregate [all#x], [max(a#x) AS max(a)#x, all#x]
+- SubqueryAlias v2
- +- View (`v2`, [a#x,b#x,all#x])
+ +- View (`v2`, [a#x, b#x, all#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x, cast(all#x as int) AS all#x]
+- SubqueryAlias t
+- LocalRelation [a#x, b#x, all#x]
@@ -49,12 +49,12 @@ Project [scalar-subquery#x [] AS scalarsubquery()#x]
: +- Sort [b#x ASC NULLS FIRST], true
: +- Project [b#x]
: +- SubqueryAlias v1
-: +- View (`v1`, [a#x,b#x,k#x])
+: +- View (`v1`, [a#x, b#x, k#x])
: +- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x, cast(k#x as int) AS k#x]
: +- SubqueryAlias t
: +- LocalRelation [a#x, b#x, k#x]
+- SubqueryAlias v2
- +- View (`v2`, [a#x,b#x,all#x])
+ +- View (`v2`, [a#x, b#x, all#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x, cast(all#x as int) AS all#x]
+- SubqueryAlias t
+- LocalRelation [a#x, b#x, all#x]
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/count.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/count.sql.out
index 29af8f2a549e..acfe447d8bf4 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/count.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/count.sql.out
@@ -19,7 +19,7 @@ FROM testData
-- !query analysis
Aggregate [count(1) AS count(1)#xL, count(1) AS count(1)#xL, count(null) AS count(NULL)#xL, count(a#x) AS count(a)#xL, count(b#x) AS count(b)#xL, count((a#x + b#x)) AS count((a + b))#xL, count(named_struct(a, a#x, b, b#x)) AS count(named_struct(a, a, b, b))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -38,7 +38,7 @@ FROM testData
-- !query analysis
Aggregate [count(distinct 1) AS count(DISTINCT 1)#xL, count(distinct null) AS count(DISTINCT NULL)#xL, count(distinct a#x) AS count(DISTINCT a)#xL, count(distinct b#x) AS count(DISTINCT b)#xL, count(distinct (a#x + b#x)) AS count(DISTINCT (a + b))#xL, count(distinct named_struct(a, a#x, b, b#x)) AS count(DISTINCT named_struct(a, a, b, b))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -50,7 +50,7 @@ SELECT count(a, b), count(b, a), count(testData.*, testData.*) FROM testData
-- !query analysis
Aggregate [count(a#x, b#x) AS count(a, b)#xL, count(b#x, a#x) AS count(b, a)#xL, count(a#x, b#x, a#x, b#x) AS count(a, b, a, b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -64,7 +64,7 @@ FROM testData
-- !query analysis
Aggregate [count(distinct a#x, b#x) AS count(DISTINCT a, b)#xL, count(distinct b#x, a#x) AS count(DISTINCT b, a)#xL, count(distinct a#x, b#x) AS count(DISTINCT a, b)#xL, count(distinct a#x, b#x, a#x, b#x) AS count(DISTINCT a, b, a, b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -97,7 +97,7 @@ SELECT count(DISTINCT a), count(DISTINCT 2,3) FROM testData
-- !query analysis
Aggregate [count(distinct a#x) AS count(DISTINCT a)#xL, count(distinct 2, 3) AS count(DISTINCT 2, 3)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -109,7 +109,7 @@ SELECT count(DISTINCT a), count(DISTINCT 3,2) FROM testData
-- !query analysis
Aggregate [count(distinct a#x) AS count(DISTINCT a)#xL, count(distinct 3, 2) AS count(DISTINCT 3, 2)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -121,7 +121,7 @@ SELECT count(DISTINCT a), count(DISTINCT 2), count(DISTINCT 2,3) FROM testData
-- !query analysis
Aggregate [count(distinct a#x) AS count(DISTINCT a)#xL, count(distinct 2) AS count(DISTINCT 2)#xL, count(distinct 2, 3) AS count(DISTINCT 2, 3)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -133,7 +133,7 @@ SELECT count(DISTINCT a), count(DISTINCT 2), count(DISTINCT 3,2) FROM testData
-- !query analysis
Aggregate [count(distinct a#x) AS count(DISTINCT a)#xL, count(distinct 2) AS count(DISTINCT 2)#xL, count(distinct 3, 2) AS count(DISTINCT 3, 2)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -145,7 +145,7 @@ SELECT count(distinct 0.8), percentile_approx(distinct a, 0.8) FROM testData
-- !query analysis
Aggregate [count(distinct 0.8) AS count(DISTINCT 0.8)#xL, percentile_approx(distinct a#x, cast(0.8 as double), 10000, 0, 0) AS percentile_approx(DISTINCT a, 0.8, 10000)#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -163,7 +163,7 @@ SELECT count() FROM testData
-- !query analysis
Aggregate [count() AS count()#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -205,7 +205,7 @@ SELECT count(testData.*) FROM testData
-- !query analysis
Aggregate [count(a#x, b#x) AS count(a, b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/cross-join.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/cross-join.sql.out
index 7d318cd949b8..6a1fec839af2 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/cross-join.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/cross-join.sql.out
@@ -39,13 +39,13 @@ SELECT * FROM nt1 cross join nt2
Project [k#x, v1#x, k#x, v2#x]
+- Join Cross
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -59,13 +59,13 @@ Project [k#x, v1#x, k#x, v2#x]
+- Filter (k#x = k#x)
+- Join Cross
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -78,13 +78,13 @@ SELECT * FROM nt1 cross join nt2 on (nt1.k = nt2.k)
Project [k#x, v1#x, k#x, v2#x]
+- Join Cross, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -98,13 +98,13 @@ Project [k#x, v1#x, k#x, v2#x]
+- Filter ((v1#x = 1) AND (v2#x = 22))
+- Join Cross
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -123,7 +123,7 @@ Project [key#x, key#x]
: +- Project [k#x AS key#x]
: +- Filter (v1#x < 2)
: +- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
@@ -132,7 +132,7 @@ Project [key#x, key#x]
+- Project [k#x AS key#x]
+- Filter (v2#x = 22)
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -145,7 +145,7 @@ create temporary view A(a, va) as select * from nt1
CreateViewCommand `A`, [(a,None), (va,None)], select * from nt1, false, false, LocalTempView, true
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
- +- View (`nt1`, [k#x,v1#x])
+ +- View (`nt1`, [k#x, v1#x])
+- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
@@ -158,7 +158,7 @@ create temporary view B(b, vb) as select * from nt1
CreateViewCommand `B`, [(b,None), (vb,None)], select * from nt1, false, false, LocalTempView, true
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
- +- View (`nt1`, [k#x,v1#x])
+ +- View (`nt1`, [k#x, v1#x])
+- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
@@ -171,7 +171,7 @@ create temporary view C(c, vc) as select * from nt1
CreateViewCommand `C`, [(c,None), (vc,None)], select * from nt1, false, false, LocalTempView, true
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
- +- View (`nt1`, [k#x,v1#x])
+ +- View (`nt1`, [k#x, v1#x])
+- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
@@ -184,7 +184,7 @@ create temporary view D(d, vd) as select * from nt1
CreateViewCommand `D`, [(d,None), (vd,None)], select * from nt1, false, false, LocalTempView, true
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
- +- View (`nt1`, [k#x,v1#x])
+ +- View (`nt1`, [k#x, v1#x])
+- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
@@ -199,41 +199,41 @@ Project [a#x, va#x, b#x, vb#x, c#x, vc#x, d#x, vd#x]
:- Join Cross
: :- Join Inner, (a#x = b#x)
: : :- SubqueryAlias a
- : : : +- View (`A`, [a#x,va#x])
+ : : : +- View (`A`, [a#x, va#x])
: : : +- Project [cast(k#x as string) AS a#x, cast(v1#x as int) AS va#x]
: : : +- Project [k#x, v1#x]
: : : +- SubqueryAlias nt1
- : : : +- View (`nt1`, [k#x,v1#x])
+ : : : +- View (`nt1`, [k#x, v1#x])
: : : +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: : : +- Project [k#x, v1#x]
: : : +- SubqueryAlias nt1
: : : +- LocalRelation [k#x, v1#x]
: : +- SubqueryAlias b
- : : +- View (`B`, [b#x,vb#x])
+ : : +- View (`B`, [b#x, vb#x])
: : +- Project [cast(k#x as string) AS b#x, cast(v1#x as int) AS vb#x]
: : +- Project [k#x, v1#x]
: : +- SubqueryAlias nt1
- : : +- View (`nt1`, [k#x,v1#x])
+ : : +- View (`nt1`, [k#x, v1#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: : +- Project [k#x, v1#x]
: : +- SubqueryAlias nt1
: : +- LocalRelation [k#x, v1#x]
: +- SubqueryAlias c
- : +- View (`C`, [c#x,vc#x])
+ : +- View (`C`, [c#x, vc#x])
: +- Project [cast(k#x as string) AS c#x, cast(v1#x as int) AS vc#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias d
- +- View (`D`, [d#x,vd#x])
+ +- View (`D`, [d#x, vd#x])
+- Project [cast(k#x as string) AS d#x, cast(v1#x as int) AS vd#x]
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
- +- View (`nt1`, [k#x,v1#x])
+ +- View (`nt1`, [k#x, v1#x])
+- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
+- Project [k#x, v1#x]
+- SubqueryAlias nt1
@@ -246,13 +246,13 @@ SELECT * FROM nt1 CROSS JOIN nt2 ON (nt1.k > nt2.k)
Project [k#x, v1#x, k#x, v2#x]
+- Join Cross, (k#x > k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/date.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/date.sql.out
index 227127a353df..a7b3dfdd32ca 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/date.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/date.sql.out
@@ -593,7 +593,7 @@ select date_add(date_str, 1) from date_view
-- !query analysis
Project [date_add(cast(date_str#x as date), 1) AS date_add(date_str, 1)#x]
+- SubqueryAlias date_view
- +- View (`date_view`, [date_str#x,int_str#x])
+ +- View (`date_view`, [date_str#x, int_str#x])
+- Project [cast(date_str#x as string) AS date_str#x, cast(int_str#x as string) AS int_str#x]
+- Project [2011-11-11 AS date_str#x, 1 AS int_str#x]
+- OneRowRelation
@@ -604,7 +604,7 @@ select date_sub(date_str, 1) from date_view
-- !query analysis
Project [date_sub(cast(date_str#x as date), 1) AS date_sub(date_str, 1)#x]
+- SubqueryAlias date_view
- +- View (`date_view`, [date_str#x,int_str#x])
+ +- View (`date_view`, [date_str#x, int_str#x])
+- Project [cast(date_str#x as string) AS date_str#x, cast(int_str#x as string) AS int_str#x]
+- Project [2011-11-11 AS date_str#x, 1 AS int_str#x]
+- OneRowRelation
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/datetime-legacy.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/datetime-legacy.sql.out
index 1243a03fcf0b..1879148f556d 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/datetime-legacy.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/datetime-legacy.sql.out
@@ -593,7 +593,7 @@ select date_add(date_str, 1) from date_view
-- !query analysis
Project [date_add(cast(date_str#x as date), 1) AS date_add(date_str, 1)#x]
+- SubqueryAlias date_view
- +- View (`date_view`, [date_str#x,int_str#x])
+ +- View (`date_view`, [date_str#x, int_str#x])
+- Project [cast(date_str#x as string) AS date_str#x, cast(int_str#x as string) AS int_str#x]
+- Project [2011-11-11 AS date_str#x, 1 AS int_str#x]
+- OneRowRelation
@@ -604,7 +604,7 @@ select date_sub(date_str, 1) from date_view
-- !query analysis
Project [date_sub(cast(date_str#x as date), 1) AS date_sub(date_str, 1)#x]
+- SubqueryAlias date_view
- +- View (`date_view`, [date_str#x,int_str#x])
+ +- View (`date_view`, [date_str#x, int_str#x])
+- Project [cast(date_str#x as string) AS date_str#x, cast(int_str#x as string) AS int_str#x]
+- Project [2011-11-11 AS date_str#x, 1 AS int_str#x]
+- OneRowRelation
@@ -1278,7 +1278,7 @@ select typeof(current_date), typeof(current_timestamp) from ttf1
-- !query analysis
Project [typeof(current_date#x) AS typeof(current_date)#x, typeof(current_timestamp#x) AS typeof(current_timestamp)#x]
+- SubqueryAlias ttf1
- +- View (`ttf1`, [current_date#x,current_timestamp#x])
+ +- View (`ttf1`, [current_date#x, current_timestamp#x])
+- Project [cast(current_date#x as int) AS current_date#x, cast(current_timestamp#x as int) AS current_timestamp#x]
+- Project [current_date#x, current_timestamp#x]
+- SubqueryAlias ttf1
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/decimalArithmeticOperations.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/decimalArithmeticOperations.sql.out
index 2512a29b28ad..5e6b27bc8441 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/decimalArithmeticOperations.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/decimalArithmeticOperations.sql.out
@@ -12,7 +12,7 @@ select a / b from t
-- !query analysis
Project [(a#x / b#x) AS (a / b)#x]
+- SubqueryAlias t
- +- View (`t`, [a#x,b#x])
+ +- View (`t`, [a#x, b#x])
+- Project [cast(a#x as decimal(2,1)) AS a#x, cast(b#x as decimal(1,1)) AS b#x]
+- Project [1.0 AS a#x, 0.0 AS b#x]
+- OneRowRelation
@@ -23,7 +23,7 @@ select a % b from t
-- !query analysis
Project [(a#x % b#x) AS (a % b)#x]
+- SubqueryAlias t
- +- View (`t`, [a#x,b#x])
+ +- View (`t`, [a#x, b#x])
+- Project [cast(a#x as decimal(2,1)) AS a#x, cast(b#x as decimal(1,1)) AS b#x]
+- Project [1.0 AS a#x, 0.0 AS b#x]
+- OneRowRelation
@@ -34,7 +34,7 @@ select pmod(a, b) from t
-- !query analysis
Project [pmod(a#x, b#x) AS pmod(a, b)#x]
+- SubqueryAlias t
- +- View (`t`, [a#x,b#x])
+ +- View (`t`, [a#x, b#x])
+- Project [cast(a#x as decimal(2,1)) AS a#x, cast(b#x as decimal(1,1)) AS b#x]
+- Project [1.0 AS a#x, 0.0 AS b#x]
+- OneRowRelation
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/except-all.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/except-all.sql.out
index fc648785cb53..d16fc0beaf5d 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/except-all.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/except-all.sql.out
@@ -229,14 +229,14 @@ SELECT * FROM tab4
Except All true
:- Project [k#x, v#x]
: +- SubqueryAlias tab3
-: +- View (`tab3`, [k#x,v#x])
+: +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -251,14 +251,14 @@ SELECT * FROM tab3
Except All true
:- Project [k#x, v#x]
: +- SubqueryAlias tab4
-: +- View (`tab4`, [k#x,v#x])
+: +- View (`tab4`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab4
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab3
- +- View (`tab3`, [k#x,v#x])
+ +- View (`tab3`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab3
@@ -275,7 +275,7 @@ SELECT * FROM tab4
Except All true
:- Project [k#x, v#x]
: +- SubqueryAlias tab4
-: +- View (`tab4`, [k#x,v#x])
+: +- View (`tab4`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab4
@@ -283,14 +283,14 @@ Except All true
+- Intersect false
:- Project [k#x, v#x]
: +- SubqueryAlias tab3
- : +- View (`tab3`, [k#x,v#x])
+ : +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -308,21 +308,21 @@ Except false
:- Except All true
: :- Project [k#x, v#x]
: : +- SubqueryAlias tab4
-: : +- View (`tab4`, [k#x,v#x])
+: : +- View (`tab4`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
-: +- View (`tab3`, [k#x,v#x])
+: +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -343,28 +343,28 @@ Except false
: :- Except All true
: : :- Project [k#x, v#x]
: : : +- SubqueryAlias tab3
-: : : +- View (`tab3`, [k#x,v#x])
+: : : +- View (`tab3`, [k#x, v#x])
: : : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : : +- Project [k#x, v#x]
: : : +- SubqueryAlias tab3
: : : +- LocalRelation [k#x, v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
-: : +- View (`tab4`, [k#x,v#x])
+: : +- View (`tab4`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
-: +- View (`tab3`, [k#x,v#x])
+: +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -411,28 +411,28 @@ Except false
: :- Except All true
: : :- Project [k#x, v#x]
: : : +- SubqueryAlias tab3
-: : : +- View (`tab3`, [k#x,v#x])
+: : : +- View (`tab3`, [k#x, v#x])
: : : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : : +- Project [k#x, v#x]
: : : +- SubqueryAlias tab3
: : : +- LocalRelation [k#x, v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
-: : +- View (`tab4`, [k#x,v#x])
+: : +- View (`tab4`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
-: +- View (`tab3`, [k#x,v#x])
+: +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -454,28 +454,28 @@ Except false
: :- Except All true
: : :- Project [k#x, v#x]
: : : +- SubqueryAlias tab3
-: : : +- View (`tab3`, [k#x,v#x])
+: : : +- View (`tab3`, [k#x, v#x])
: : : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : : +- Project [k#x, v#x]
: : : +- SubqueryAlias tab3
: : : +- LocalRelation [k#x, v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
-: : +- View (`tab4`, [k#x,v#x])
+: : +- View (`tab4`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
-: +- View (`tab3`, [k#x,v#x])
+: +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -496,28 +496,28 @@ Except false
: :- Except All true
: : :- Project [k#x, v#x]
: : : +- SubqueryAlias tab3
-: : : +- View (`tab3`, [k#x,v#x])
+: : : +- View (`tab3`, [k#x, v#x])
: : : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : : +- Project [k#x, v#x]
: : : +- SubqueryAlias tab3
: : : +- LocalRelation [k#x, v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
-: : +- View (`tab4`, [k#x,v#x])
+: : +- View (`tab4`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab4
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
-: +- View (`tab3`, [k#x,v#x])
+: +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -545,13 +545,13 @@ Except All true
: +- Project [k#x, v#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias tab3
-: : +- View (`tab3`, [k#x,v#x])
+: : +- View (`tab3`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab3
: : +- LocalRelation [k#x, v#x]
: +- SubqueryAlias tab4
-: +- View (`tab4`, [k#x,v#x])
+: +- View (`tab4`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab4
@@ -561,13 +561,13 @@ Except All true
+- Project [k#x, v#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias tab3
- : +- View (`tab3`, [k#x,v#x])
+ : +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -595,13 +595,13 @@ Except All true
: +- Project [k#x, v#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias tab3
-: : +- View (`tab3`, [k#x,v#x])
+: : +- View (`tab3`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab3
: : +- LocalRelation [k#x, v#x]
: +- SubqueryAlias tab4
-: +- View (`tab4`, [k#x,v#x])
+: +- View (`tab4`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab4
@@ -611,13 +611,13 @@ Except All true
+- Project [v#x AS k#x, k#x AS v#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias tab3
- : +- View (`tab3`, [k#x,v#x])
+ : +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
@@ -632,14 +632,14 @@ SELECT k FROM tab4 GROUP BY k
Except All true
:- Aggregate [v#x], [v#x]
: +- SubqueryAlias tab3
-: +- View (`tab3`, [k#x,v#x])
+: +- View (`tab3`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab3
: +- LocalRelation [k#x, v#x]
+- Aggregate [k#x], [k#x]
+- SubqueryAlias tab4
- +- View (`tab4`, [k#x,v#x])
+ +- View (`tab4`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab4
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/except.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/except.sql.out
index 3c45f4717439..6244a8bed560 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/except.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/except.sql.out
@@ -45,14 +45,14 @@ SELECT * FROM t1 EXCEPT SELECT * FROM t2
Except false
:- Project [k#x, v#x]
: +- SubqueryAlias t1
-: +- View (`t1`, [k#x,v#x])
+: +- View (`t1`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t2
- +- View (`t2`, [k#x,v#x])
+ +- View (`t2`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t2
@@ -65,7 +65,7 @@ SELECT * FROM t1 EXCEPT SELECT * FROM t1 where v <> 1 and v <> 2
Except false
:- Project [k#x, v#x]
: +- SubqueryAlias t1
-: +- View (`t1`, [k#x,v#x])
+: +- View (`t1`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t1
@@ -73,7 +73,7 @@ Except false
+- Project [k#x, v#x]
+- Filter (NOT (v#x = 1) AND NOT (v#x = 2))
+- SubqueryAlias t1
- +- View (`t1`, [k#x,v#x])
+ +- View (`t1`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t1
@@ -87,7 +87,7 @@ Except false
:- Project [k#x, v#x]
: +- Filter (NOT (v#x = 1) AND NOT (v#x = 22))
: +- SubqueryAlias t1
-: +- View (`t1`, [k#x,v#x])
+: +- View (`t1`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t1
@@ -95,7 +95,7 @@ Except false
+- Project [k#x, v#x]
+- Filter (NOT (v#x = 2) AND (v#x >= 3))
+- SubqueryAlias t1
- +- View (`t1`, [k#x,v#x])
+ +- View (`t1`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t1
@@ -112,13 +112,13 @@ Except false
: +- Filter (k#x = k#x)
: +- Join Inner
: :- SubqueryAlias t1
-: : +- View (`t1`, [k#x,v#x])
+: : +- View (`t1`, [k#x, v#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias t1
: : +- LocalRelation [k#x, v#x]
: +- SubqueryAlias t2
-: +- View (`t2`, [k#x,v#x])
+: +- View (`t2`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t2
@@ -127,13 +127,13 @@ Except false
+- Filter ((k#x = k#x) AND NOT (k#x = one))
+- Join Inner
:- SubqueryAlias t1
- : +- View (`t1`, [k#x,v#x])
+ : +- View (`t1`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t1
: +- LocalRelation [k#x, v#x]
+- SubqueryAlias t2
- +- View (`t2`, [k#x,v#x])
+ +- View (`t2`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t2
@@ -147,14 +147,14 @@ Except false
:- Project [k#x, v#x]
: +- Filter ((v#x >= 1) AND NOT (v#x = 22))
: +- SubqueryAlias t2
-: +- View (`t2`, [k#x,v#x])
+: +- View (`t2`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t2
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t1
- +- View (`t1`, [k#x,v#x])
+ +- View (`t1`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t1
@@ -171,13 +171,13 @@ Except false
: : +- Aggregate [min(k#x) AS min(k)#x]
: : +- Filter (k#x = outer(k#x))
: : +- SubqueryAlias t2
-: : +- View (`t2`, [k#x,v#x])
+: : +- View (`t2`, [k#x, v#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias t2
: : +- LocalRelation [k#x, v#x]
: +- SubqueryAlias t1
-: +- View (`t1`, [k#x,v#x])
+: +- View (`t1`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t1
@@ -185,14 +185,14 @@ Except false
+- Project [scalar-subquery#x [] AS abs_min_t2#x]
: +- Aggregate [min(k#x) AS min(k)#x]
: +- SubqueryAlias t2
- : +- View (`t2`, [k#x,v#x])
+ : +- View (`t2`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t2
: +- LocalRelation [k#x, v#x]
+- Filter (k#x = one)
+- SubqueryAlias t1
- +- View (`t1`, [k#x,v#x])
+ +- View (`t1`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t1
@@ -218,13 +218,13 @@ Except false
: : +- Aggregate [max(v#x) AS max(v)#x]
: : +- Filter (k#x = outer(k#x))
: : +- SubqueryAlias t2
-: : +- View (`t2`, [k#x,v#x])
+: : +- View (`t2`, [k#x, v#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias t2
: : +- LocalRelation [k#x, v#x]
: +- SubqueryAlias t1
-: +- View (`t1`, [k#x,v#x])
+: +- View (`t1`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t1
@@ -234,13 +234,13 @@ Except false
: +- Aggregate [min(v#x) AS min(v)#x]
: +- Filter (k#x = outer(k#x))
: +- SubqueryAlias t2
- : +- View (`t2`, [k#x,v#x])
+ : +- View (`t2`, [k#x, v#x])
: +- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias t2
: +- LocalRelation [k#x, v#x]
+- SubqueryAlias t1
- +- View (`t1`, [k#x,v#x])
+ +- View (`t1`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias t1
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/execute-immediate.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/execute-immediate.sql.out
index 21930ebe6f0b..cf1e71c91fb9 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/execute-immediate.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/execute-immediate.sql.out
@@ -57,7 +57,7 @@ EXECUTE IMMEDIATE 'CREATE TEMPORARY VIEW IDENTIFIER(:tblName) AS SELECT id, name
CreateViewCommand `tbl_view_tmp`, SELECT id, name FROM tbl_view, false, false, LocalTempView, true
+- Project [id#x, name#x]
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -69,11 +69,11 @@ EXECUTE IMMEDIATE 'SELECT * FROM tbl_view_tmp'
-- !query analysis
Project [id#x, name#x]
+- SubqueryAlias tbl_view_tmp
- +- View (`tbl_view_tmp`, [id#x,name#x])
+ +- View (`tbl_view_tmp`, [id#x, name#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x]
+- Project [id#x, name#x]
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -92,7 +92,7 @@ EXECUTE IMMEDIATE sql_string
Project [id#x, name#x, data#x]
+- Filter (name#x = name1)
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -105,7 +105,7 @@ EXECUTE IMMEDIATE 'SELECT * from tbl_view where name = \'name1\''
Project [id#x, name#x, data#x]
+- Filter (name#x = name1)
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -141,7 +141,7 @@ EXECUTE IMMEDIATE sql_string USING 'name1', 'name3'
Project [id#x, name#x, data#x]
+- Filter ((name#x = name1) OR (name#x = name3))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -154,7 +154,7 @@ EXECUTE IMMEDIATE sql_string USING a, 'name2'
Project [id#x, name#x, data#x]
+- Filter ((name#x = variablereference(system.session.a='name1')) OR (name#x = name2))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -167,7 +167,7 @@ EXECUTE IMMEDIATE 'SELECT * from tbl_view where name = ? or name = ?' USING 'nam
Project [id#x, name#x, data#x]
+- Filter ((name#x = name1) OR (name#x = name3))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -180,7 +180,7 @@ EXECUTE IMMEDIATE 'SELECT * from tbl_view where name = ? or name = ?' USING a, '
Project [id#x, name#x, data#x]
+- Filter ((name#x = variablereference(system.session.a='name1')) OR (name#x = name2))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -193,7 +193,7 @@ EXECUTE IMMEDIATE 'SELECT * from tbl_view where name = ? or name = ?' USING (a,
Project [id#x, name#x, data#x]
+- Filter ((name#x = variablereference(system.session.a='name1')) OR (name#x = name2))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -245,7 +245,7 @@ EXECUTE IMMEDIATE sql_string USING 40 as second, 'name7' as first
Project [id#x, name#x, data#x]
+- Filter ((name#x = name7) OR (id#x = 40))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -258,7 +258,7 @@ EXECUTE IMMEDIATE sql_string USING b as second, 'name7' as first
Project [id#x, name#x, data#x]
+- Filter ((name#x = name7) OR (id#x = variablereference(system.session.b=40)))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -271,7 +271,7 @@ EXECUTE IMMEDIATE 'SELECT * from tbl_view where name = :first or id = :second' U
Project [id#x, name#x, data#x]
+- Filter ((name#x = name7) OR (id#x = 40))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -284,7 +284,7 @@ EXECUTE IMMEDIATE 'SELECT * from tbl_view where name = :first or id = :second' U
Project [id#x, name#x, data#x]
+- Filter ((name#x = name7) OR (id#x = variablereference(system.session.b=40)))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -297,7 +297,7 @@ EXECUTE IMMEDIATE 'SELECT tbl_view.*, :first as p FROM tbl_view WHERE name = :fi
Project [id#x, name#x, data#x, name7 AS p#x]
+- Filter (name#x = name7)
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -335,7 +335,7 @@ SetVariable [variablereference(system.session.res_id=CAST(NULL AS INT))]
+- Project [id#x]
+- Filter (name#x = name7)
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -358,7 +358,7 @@ SetVariable [variablereference(system.session.res_id=70)]
+- Project [id#x]
+- Filter (name#x = variablereference(system.session.a='name1'))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -404,7 +404,7 @@ SetVariable [variablereference(system.session.b=40), variablereference(system.se
+- Project [id#x, name#x]
+- Filter (id#x = 10)
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
@@ -424,7 +424,7 @@ EXECUTE IMMEDIATE 'SELECT * FROM tbl_view where id = ? AND name = ?' USING b as
Project [id#x, name#x, data#x]
+- Filter ((id#x = variablereference(system.session.b=10)) AND (name#x = variablereference(system.session.a='name1')))
+- SubqueryAlias tbl_view
- +- View (`tbl_view`, [id#x,name#x,data#x])
+ +- View (`tbl_view`, [id#x, name#x, data#x])
+- Project [cast(id#x as int) AS id#x, cast(name#x as string) AS name#x, cast(data#x as struct<f1:int,s2:struct<f2:int,f3:string>>) AS data#x]
+- Project [id#x, name#x, data#x]
+- SubqueryAlias tbl_view
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/extract.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/extract.sql.out
index b7c5a44ae225..886d1f8616c7 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/extract.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/extract.sql.out
@@ -12,7 +12,7 @@ select extract(year from c), extract(year from ntz), extract(year from i) from t
-- !query analysis
Project [extract(year, c#x) AS extract(year FROM c)#x, extract(year, ntz#x) AS extract(year FROM ntz)#x, extract(year, i#x) AS extract(year FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -23,7 +23,7 @@ select extract(y from c), extract(y from ntz), extract(y from i) from t
-- !query analysis
Project [extract(y, c#x) AS extract(y FROM c)#x, extract(y, ntz#x) AS extract(y FROM ntz)#x, extract(y, i#x) AS extract(y FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -34,7 +34,7 @@ select extract(years from c), extract(years from ntz), extract(years from i) fro
-- !query analysis
Project [extract(years, c#x) AS extract(years FROM c)#x, extract(years, ntz#x) AS extract(years FROM ntz)#x, extract(years, i#x) AS extract(years FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -45,7 +45,7 @@ select extract(yr from c), extract(yr from ntz), extract(yr from i) from t
-- !query analysis
Project [extract(yr, c#x) AS extract(yr FROM c)#x, extract(yr, ntz#x) AS extract(yr FROM ntz)#x, extract(yr, i#x) AS extract(yr FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -56,7 +56,7 @@ select extract(yrs from c), extract(yrs from ntz), extract(yrs from i) from t
-- !query analysis
Project [extract(yrs, c#x) AS extract(yrs FROM c)#x, extract(yrs, ntz#x) AS extract(yrs FROM ntz)#x, extract(yrs, i#x) AS extract(yrs FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -67,7 +67,7 @@ select extract(yearofweek from c), extract(yearofweek from ntz) from t
-- !query analysis
Project [extract(yearofweek, c#x) AS extract(yearofweek FROM c)#x, extract(yearofweek, ntz#x) AS extract(yearofweek FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -78,7 +78,7 @@ select extract(quarter from c), extract(quarter from ntz) from t
-- !query analysis
Project [extract(quarter, c#x) AS extract(quarter FROM c)#x, extract(quarter, ntz#x) AS extract(quarter FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -89,7 +89,7 @@ select extract(qtr from c), extract(qtr from ntz) from t
-- !query analysis
Project [extract(qtr, c#x) AS extract(qtr FROM c)#x, extract(qtr, ntz#x) AS extract(qtr FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -100,7 +100,7 @@ select extract(month from c), extract(month from ntz), extract(month from i) fro
-- !query analysis
Project [extract(month, c#x) AS extract(month FROM c)#x, extract(month, ntz#x) AS extract(month FROM ntz)#x, extract(month, i#x) AS extract(month FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -111,7 +111,7 @@ select extract(mon from c), extract(mon from ntz), extract(mon from i) from t
-- !query analysis
Project [extract(mon, c#x) AS extract(mon FROM c)#x, extract(mon, ntz#x) AS extract(mon FROM ntz)#x, extract(mon, i#x) AS extract(mon FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -122,7 +122,7 @@ select extract(mons from c), extract(mons from ntz), extract(mons from i) from t
-- !query analysis
Project [extract(mons, c#x) AS extract(mons FROM c)#x, extract(mons, ntz#x) AS extract(mons FROM ntz)#x, extract(mons, i#x) AS extract(mons FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -133,7 +133,7 @@ select extract(months from c), extract(months from ntz), extract(months from i)
-- !query analysis
Project [extract(months, c#x) AS extract(months FROM c)#x, extract(months, ntz#x) AS extract(months FROM ntz)#x, extract(months, i#x) AS extract(months FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -144,7 +144,7 @@ select extract(week from c), extract(week from ntz) from t
-- !query analysis
Project [extract(week, c#x) AS extract(week FROM c)#x, extract(week, ntz#x) AS extract(week FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -155,7 +155,7 @@ select extract(w from c), extract(w from ntz) from t
-- !query analysis
Project [extract(w, c#x) AS extract(w FROM c)#x, extract(w, ntz#x) AS extract(w FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -166,7 +166,7 @@ select extract(weeks from c), extract(weeks from ntz) from t
-- !query analysis
Project [extract(weeks, c#x) AS extract(weeks FROM c)#x, extract(weeks, ntz#x) AS extract(weeks FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -177,7 +177,7 @@ select extract(day from c), extract(day from ntz), extract(day from j) from t
-- !query analysis
Project [extract(day, c#x) AS extract(day FROM c)#x, extract(day, ntz#x) AS extract(day FROM ntz)#x, extract(day, j#x) AS extract(day FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -188,7 +188,7 @@ select extract(d from c), extract(d from ntz), extract(d from j) from t
-- !query analysis
Project [extract(d, c#x) AS extract(d FROM c)#x, extract(d, ntz#x) AS extract(d FROM ntz)#x, extract(d, j#x) AS extract(d FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -199,7 +199,7 @@ select extract(days from c), extract(days from ntz), extract(days from j) from t
-- !query analysis
Project [extract(days, c#x) AS extract(days FROM c)#x, extract(days, ntz#x) AS extract(days FROM ntz)#x, extract(days, j#x) AS extract(days FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -210,7 +210,7 @@ select extract(dayofweek from c), extract(dayofweek from ntz) from t
-- !query analysis
Project [extract(dayofweek, c#x) AS extract(dayofweek FROM c)#x, extract(dayofweek, ntz#x) AS extract(dayofweek FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -221,7 +221,7 @@ select extract(dow from c), extract(dow from ntz) from t
-- !query analysis
Project [extract(dow, c#x) AS extract(dow FROM c)#x, extract(dow, ntz#x) AS extract(dow FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -232,7 +232,7 @@ select extract(dayofweek_iso from c), extract(dayofweek_iso from ntz) from t
-- !query analysis
Project [extract(dayofweek_iso, c#x) AS extract(dayofweek_iso FROM c)#x, extract(dayofweek_iso, ntz#x) AS extract(dayofweek_iso FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -243,7 +243,7 @@ select extract(dow_iso from c), extract(dow_iso from ntz) from t
-- !query analysis
Project [extract(dow_iso, c#x) AS extract(dow_iso FROM c)#x, extract(dow_iso, ntz#x) AS extract(dow_iso FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -254,7 +254,7 @@ select extract(doy from c), extract(doy from ntz) from t
-- !query analysis
Project [extract(doy, c#x) AS extract(doy FROM c)#x, extract(doy, ntz#x) AS extract(doy FROM ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -265,7 +265,7 @@ select extract(hour from c), extract(hour from ntz), extract(hour from j) from t
-- !query analysis
Project [extract(hour, c#x) AS extract(hour FROM c)#x, extract(hour, ntz#x) AS extract(hour FROM ntz)#x, extract(hour, j#x) AS extract(hour FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -276,7 +276,7 @@ select extract(h from c), extract(h from ntz), extract(h from j) from t
-- !query analysis
Project [extract(h, c#x) AS extract(h FROM c)#x, extract(h, ntz#x) AS extract(h FROM ntz)#x, extract(h, j#x) AS extract(h FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -287,7 +287,7 @@ select extract(hours from c), extract(hours from ntz), extract(hours from j) fro
-- !query analysis
Project [extract(hours, c#x) AS extract(hours FROM c)#x, extract(hours, ntz#x) AS extract(hours FROM ntz)#x, extract(hours, j#x) AS extract(hours FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -298,7 +298,7 @@ select extract(hr from c), extract(hr from ntz), extract(hr from j) from t
-- !query analysis
Project [extract(hr, c#x) AS extract(hr FROM c)#x, extract(hr, ntz#x) AS extract(hr FROM ntz)#x, extract(hr, j#x) AS extract(hr FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -309,7 +309,7 @@ select extract(hrs from c), extract(hrs from ntz), extract(hrs from j) from t
-- !query analysis
Project [extract(hrs, c#x) AS extract(hrs FROM c)#x, extract(hrs, ntz#x) AS extract(hrs FROM ntz)#x, extract(hrs, j#x) AS extract(hrs FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -320,7 +320,7 @@ select extract(minute from c), extract(minute from ntz), extract(minute from j)
-- !query analysis
Project [extract(minute, c#x) AS extract(minute FROM c)#x, extract(minute, ntz#x) AS extract(minute FROM ntz)#x, extract(minute, j#x) AS extract(minute FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -331,7 +331,7 @@ select extract(m from c), extract(m from ntz), extract(m from j) from t
-- !query analysis
Project [extract(m, c#x) AS extract(m FROM c)#x, extract(m, ntz#x) AS extract(m FROM ntz)#x, extract(m, j#x) AS extract(m FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -342,7 +342,7 @@ select extract(min from c), extract(min from ntz), extract(min from j) from t
-- !query analysis
Project [extract(min, c#x) AS extract(min FROM c)#x, extract(min, ntz#x) AS extract(min FROM ntz)#x, extract(min, j#x) AS extract(min FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -353,7 +353,7 @@ select extract(mins from c), extract(mins from ntz), extract(mins from j) from t
-- !query analysis
Project [extract(mins, c#x) AS extract(mins FROM c)#x, extract(mins, ntz#x) AS extract(mins FROM ntz)#x, extract(mins, j#x) AS extract(mins FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -364,7 +364,7 @@ select extract(minutes from c), extract(minutes from ntz), extract(minutes from
-- !query analysis
Project [extract(minutes, c#x) AS extract(minutes FROM c)#x, extract(minutes, ntz#x) AS extract(minutes FROM ntz)#x, extract(minutes, j#x) AS extract(minutes FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -375,7 +375,7 @@ select extract(second from c), extract(second from ntz), extract(second from j)
-- !query analysis
Project [extract(second, c#x) AS extract(second FROM c)#x, extract(second, ntz#x) AS extract(second FROM ntz)#x, extract(second, j#x) AS extract(second FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -386,7 +386,7 @@ select extract(s from c), extract(s from ntz), extract(s from j) from t
-- !query analysis
Project [extract(s, c#x) AS extract(s FROM c)#x, extract(s, ntz#x) AS extract(s FROM ntz)#x, extract(s, j#x) AS extract(s FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -397,7 +397,7 @@ select extract(sec from c), extract(sec from ntz), extract(sec from j) from t
-- !query analysis
Project [extract(sec, c#x) AS extract(sec FROM c)#x, extract(sec, ntz#x) AS extract(sec FROM ntz)#x, extract(sec, j#x) AS extract(sec FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -408,7 +408,7 @@ select extract(seconds from c), extract(seconds from ntz), extract(seconds from
-- !query analysis
Project [extract(seconds, c#x) AS extract(seconds FROM c)#x, extract(seconds, ntz#x) AS extract(seconds FROM ntz)#x, extract(seconds, j#x) AS extract(seconds FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -419,7 +419,7 @@ select extract(secs from c), extract(secs from ntz), extract(secs from j) from t
-- !query analysis
Project [extract(secs, c#x) AS extract(secs FROM c)#x, extract(secs, ntz#x) AS extract(secs FROM ntz)#x, extract(secs, j#x) AS extract(secs FROM j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -493,7 +493,7 @@ select date_part('year', c), date_part('year', ntz), date_part('year', i) from t
-- !query analysis
Project [date_part(year, c#x) AS date_part(year, c)#x, date_part(year, ntz#x) AS date_part(year, ntz)#x, date_part(year, i#x) AS date_part(year, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -504,7 +504,7 @@ select date_part('y', c), date_part('y', ntz), date_part('y', i) from t
-- !query analysis
Project [date_part(y, c#x) AS date_part(y, c)#x, date_part(y, ntz#x) AS date_part(y, ntz)#x, date_part(y, i#x) AS date_part(y, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -515,7 +515,7 @@ select date_part('years', c), date_part('years', ntz), date_part('years', i) fro
-- !query analysis
Project [date_part(years, c#x) AS date_part(years, c)#x, date_part(years, ntz#x) AS date_part(years, ntz)#x, date_part(years, i#x) AS date_part(years, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -526,7 +526,7 @@ select date_part('yr', c), date_part('yr', ntz), date_part('yr', i) from t
-- !query analysis
Project [date_part(yr, c#x) AS date_part(yr, c)#x, date_part(yr, ntz#x) AS date_part(yr, ntz)#x, date_part(yr, i#x) AS date_part(yr, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -537,7 +537,7 @@ select date_part('yrs', c), date_part('yrs', ntz), date_part('yrs', i) from t
-- !query analysis
Project [date_part(yrs, c#x) AS date_part(yrs, c)#x, date_part(yrs, ntz#x) AS date_part(yrs, ntz)#x, date_part(yrs, i#x) AS date_part(yrs, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -548,7 +548,7 @@ select date_part('yearofweek', c), date_part('yearofweek', ntz) from t
-- !query analysis
Project [date_part(yearofweek, c#x) AS date_part(yearofweek, c)#x, date_part(yearofweek, ntz#x) AS date_part(yearofweek, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -559,7 +559,7 @@ select date_part('quarter', c), date_part('quarter', ntz) from t
-- !query analysis
Project [date_part(quarter, c#x) AS date_part(quarter, c)#x, date_part(quarter, ntz#x) AS date_part(quarter, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -570,7 +570,7 @@ select date_part('qtr', c), date_part('qtr', ntz) from t
-- !query analysis
Project [date_part(qtr, c#x) AS date_part(qtr, c)#x, date_part(qtr, ntz#x) AS date_part(qtr, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -581,7 +581,7 @@ select date_part('month', c), date_part('month', ntz), date_part('month', i) fro
-- !query analysis
Project [date_part(month, c#x) AS date_part(month, c)#x, date_part(month, ntz#x) AS date_part(month, ntz)#x, date_part(month, i#x) AS date_part(month, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -592,7 +592,7 @@ select date_part('mon', c), date_part('mon', ntz), date_part('mon', i) from t
-- !query analysis
Project [date_part(mon, c#x) AS date_part(mon, c)#x, date_part(mon, ntz#x) AS date_part(mon, ntz)#x, date_part(mon, i#x) AS date_part(mon, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -603,7 +603,7 @@ select date_part('mons', c), date_part('mons', ntz), date_part('mons', i) from t
-- !query analysis
Project [date_part(mons, c#x) AS date_part(mons, c)#x, date_part(mons, ntz#x) AS date_part(mons, ntz)#x, date_part(mons, i#x) AS date_part(mons, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -614,7 +614,7 @@ select date_part('months', c), date_part('months', ntz), date_part('months', i)
-- !query analysis
Project [date_part(months, c#x) AS date_part(months, c)#x, date_part(months, ntz#x) AS date_part(months, ntz)#x, date_part(months, i#x) AS date_part(months, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -625,7 +625,7 @@ select date_part('week', c), date_part('week', ntz) from t
-- !query analysis
Project [date_part(week, c#x) AS date_part(week, c)#x, date_part(week, ntz#x) AS date_part(week, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -636,7 +636,7 @@ select date_part('w', c), date_part('w', ntz) from t
-- !query analysis
Project [date_part(w, c#x) AS date_part(w, c)#x, date_part(w, ntz#x) AS date_part(w, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -647,7 +647,7 @@ select date_part('weeks', c), date_part('weeks', ntz) from t
-- !query analysis
Project [date_part(weeks, c#x) AS date_part(weeks, c)#x, date_part(weeks, ntz#x) AS date_part(weeks, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -658,7 +658,7 @@ select date_part('day', c), date_part('day', ntz), date_part('day', j) from t
-- !query analysis
Project [date_part(day, c#x) AS date_part(day, c)#x, date_part(day, ntz#x) AS date_part(day, ntz)#x, date_part(day, j#x) AS date_part(day, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -669,7 +669,7 @@ select date_part('d', c), date_part('d', ntz), date_part('d', j) from t
-- !query analysis
Project [date_part(d, c#x) AS date_part(d, c)#x, date_part(d, ntz#x) AS date_part(d, ntz)#x, date_part(d, j#x) AS date_part(d, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -680,7 +680,7 @@ select date_part('days', c), date_part('days', ntz), date_part('days', j) from t
-- !query analysis
Project [date_part(days, c#x) AS date_part(days, c)#x, date_part(days, ntz#x) AS date_part(days, ntz)#x, date_part(days, j#x) AS date_part(days, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -691,7 +691,7 @@ select date_part('dayofweek', c), date_part('dayofweek', ntz) from t
-- !query analysis
Project [date_part(dayofweek, c#x) AS date_part(dayofweek, c)#x, date_part(dayofweek, ntz#x) AS date_part(dayofweek, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -702,7 +702,7 @@ select date_part('dow', c), date_part('dow', ntz) from t
-- !query analysis
Project [date_part(dow, c#x) AS date_part(dow, c)#x, date_part(dow, ntz#x) AS date_part(dow, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -713,7 +713,7 @@ select date_part('dayofweek_iso', c), date_part('dayofweek_iso', ntz) from t
-- !query analysis
Project [date_part(dayofweek_iso, c#x) AS date_part(dayofweek_iso, c)#x, date_part(dayofweek_iso, ntz#x) AS date_part(dayofweek_iso, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -724,7 +724,7 @@ select date_part('dow_iso', c), date_part('dow_iso', ntz) from t
-- !query analysis
Project [date_part(dow_iso, c#x) AS date_part(dow_iso, c)#x, date_part(dow_iso, ntz#x) AS date_part(dow_iso, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -735,7 +735,7 @@ select date_part('doy', c), date_part('doy', ntz) from t
-- !query analysis
Project [date_part(doy, c#x) AS date_part(doy, c)#x, date_part(doy, ntz#x) AS date_part(doy, ntz)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -746,7 +746,7 @@ select date_part('hour', c), date_part('hour', ntz), date_part('hour', j) from t
-- !query analysis
Project [date_part(hour, c#x) AS date_part(hour, c)#x, date_part(hour, ntz#x) AS date_part(hour, ntz)#x, date_part(hour, j#x) AS date_part(hour, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -757,7 +757,7 @@ select date_part('h', c), date_part('h', ntz), date_part('h', j) from t
-- !query analysis
Project [date_part(h, c#x) AS date_part(h, c)#x, date_part(h, ntz#x) AS date_part(h, ntz)#x, date_part(h, j#x) AS date_part(h, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -768,7 +768,7 @@ select date_part('hours', c), date_part('hours', ntz), date_part('hours', j) fro
-- !query analysis
Project [date_part(hours, c#x) AS date_part(hours, c)#x, date_part(hours, ntz#x) AS date_part(hours, ntz)#x, date_part(hours, j#x) AS date_part(hours, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -779,7 +779,7 @@ select date_part('hr', c), date_part('hr', ntz), date_part('hr', j) from t
-- !query analysis
Project [date_part(hr, c#x) AS date_part(hr, c)#x, date_part(hr, ntz#x) AS date_part(hr, ntz)#x, date_part(hr, j#x) AS date_part(hr, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -790,7 +790,7 @@ select date_part('hrs', c), date_part('hrs', ntz), date_part('hrs', j) from t
-- !query analysis
Project [date_part(hrs, c#x) AS date_part(hrs, c)#x, date_part(hrs, ntz#x) AS date_part(hrs, ntz)#x, date_part(hrs, j#x) AS date_part(hrs, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -801,7 +801,7 @@ select date_part('minute', c), date_part('minute', ntz), date_part('minute', j)
-- !query analysis
Project [date_part(minute, c#x) AS date_part(minute, c)#x, date_part(minute, ntz#x) AS date_part(minute, ntz)#x, date_part(minute, j#x) AS date_part(minute, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -812,7 +812,7 @@ select date_part('m', c), date_part('m', ntz), date_part('m', j) from t
-- !query analysis
Project [date_part(m, c#x) AS date_part(m, c)#x, date_part(m, ntz#x) AS date_part(m, ntz)#x, date_part(m, j#x) AS date_part(m, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -823,7 +823,7 @@ select date_part('min', c), date_part('min', ntz), date_part('min', j) from t
-- !query analysis
Project [date_part(min, c#x) AS date_part(min, c)#x, date_part(min, ntz#x) AS date_part(min, ntz)#x, date_part(min, j#x) AS date_part(min, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -834,7 +834,7 @@ select date_part('mins', c), date_part('mins', ntz), date_part('mins', j) from t
-- !query analysis
Project [date_part(mins, c#x) AS date_part(mins, c)#x, date_part(mins, ntz#x) AS date_part(mins, ntz)#x, date_part(mins, j#x) AS date_part(mins, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -845,7 +845,7 @@ select date_part('minutes', c), date_part('minutes', ntz), date_part('minutes',
-- !query analysis
Project [date_part(minutes, c#x) AS date_part(minutes, c)#x, date_part(minutes, ntz#x) AS date_part(minutes, ntz)#x, date_part(minutes, j#x) AS date_part(minutes, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -856,7 +856,7 @@ select date_part('second', c), date_part('second', ntz), date_part('second', j)
-- !query analysis
Project [date_part(second, c#x) AS date_part(second, c)#x, date_part(second, ntz#x) AS date_part(second, ntz)#x, date_part(second, j#x) AS date_part(second, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -867,7 +867,7 @@ select date_part('s', c), date_part('s', ntz), date_part('s', j) from t
-- !query analysis
Project [date_part(s, c#x) AS date_part(s, c)#x, date_part(s, ntz#x) AS date_part(s, ntz)#x, date_part(s, j#x) AS date_part(s, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -878,7 +878,7 @@ select date_part('sec', c), date_part('sec', ntz), date_part('sec', j) from t
-- !query analysis
Project [date_part(sec, c#x) AS date_part(sec, c)#x, date_part(sec, ntz#x) AS date_part(sec, ntz)#x, date_part(sec, j#x) AS date_part(sec, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -889,7 +889,7 @@ select date_part('seconds', c), date_part('seconds', ntz), date_part('seconds',
-- !query analysis
Project [date_part(seconds, c#x) AS date_part(seconds, c)#x, date_part(seconds, ntz#x) AS date_part(seconds, ntz)#x, date_part(seconds, j#x) AS date_part(seconds, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -900,7 +900,7 @@ select date_part('secs', c), date_part('secs', ntz), date_part('secs', j) from t
-- !query analysis
Project [date_part(secs, c#x) AS date_part(secs, c)#x, date_part(secs, ntz#x) AS date_part(secs, ntz)#x, date_part(secs, j#x) AS date_part(secs, j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -954,7 +954,7 @@ select date_part(null, c) from t
-- !query analysis
Project [date_part(null, c#x) AS date_part(NULL, c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -987,7 +987,7 @@ select date_part(null, i) from t
-- !query analysis
Project [date_part(null, i#x) AS date_part(NULL, i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -998,7 +998,7 @@ select extract('year', c) from t
-- !query analysis
Project [extract(year, c#x) AS extract(year FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1009,7 +1009,7 @@ select extract('quarter', c) from t
-- !query analysis
Project [extract(quarter, c#x) AS extract(quarter FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1020,7 +1020,7 @@ select extract('month', c) from t
-- !query analysis
Project [extract(month, c#x) AS extract(month FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1031,7 +1031,7 @@ select extract('week', c) from t
-- !query analysis
Project [extract(week, c#x) AS extract(week FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1042,7 +1042,7 @@ select extract('day', c) from t
-- !query analysis
Project [extract(day, c#x) AS extract(day FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1053,7 +1053,7 @@ select extract('days', c) from t
-- !query analysis
Project [extract(days, c#x) AS extract(days FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1064,7 +1064,7 @@ select extract('dayofweek', c) from t
-- !query analysis
Project [extract(dayofweek, c#x) AS extract(dayofweek FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1075,7 +1075,7 @@ select extract('dow', c) from t
-- !query analysis
Project [extract(dow, c#x) AS extract(dow FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1086,7 +1086,7 @@ select extract('doy', c) from t
-- !query analysis
Project [extract(doy, c#x) AS extract(doy FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1097,7 +1097,7 @@ select extract('hour', c) from t
-- !query analysis
Project [extract(hour, c#x) AS extract(hour FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1108,7 +1108,7 @@ select extract('minute', c) from t
-- !query analysis
Project [extract(minute, c#x) AS extract(minute FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1119,7 +1119,7 @@ select extract('second', c) from t
-- !query analysis
Project [extract(second, c#x) AS extract(second FROM c)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1130,7 +1130,7 @@ select c - j from t
-- !query analysis
Project [cast(c#x - j#x as string) AS c - j#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1141,7 +1141,7 @@ select day(c - j) from t
-- !query analysis
Project [day(cast(cast(c#x - j#x as string) as date)) AS day(c - j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1152,7 +1152,7 @@ select extract(day from c - j) from t
-- !query analysis
Project [extract(day, cast(c#x - j#x as string)) AS extract(day FROM c - j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1163,7 +1163,7 @@ select extract(month from to_timestamp(c) - i) from t
-- !query analysis
Project [extract(month, to_timestamp(c#x, None, TimestampType, Some(America/Los_Angeles), false) - i#x) AS extract(month FROM to_timestamp(c) - i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1174,7 +1174,7 @@ select extract(second from to_timestamp(c) - j) from t
-- !query analysis
Project [extract(second, cast(to_timestamp(c#x, None, TimestampType, Some(America/Los_Angeles), false) - j#x as timestamp)) AS extract(second FROM to_timestamp(c) - j)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
@@ -1430,7 +1430,7 @@ select datepart('year', c), datepart('year', ntz), datepart('year', i) from t
-- !query analysis
Project [datepart(year, c#x) AS datepart(year FROM c)#x, datepart(year, ntz#x) AS datepart(year FROM ntz)#x, datepart(year, i#x) AS datepart(year FROM i)#x]
+- SubqueryAlias t
- +- View (`t`, [c#x,ntz#x,i#x,j#x])
+ +- View (`t`, [c#x, ntz#x, i#x, j#x])
+- Project [cast(c#x as string) AS c#x, cast(ntz#x as timestamp_ntz) AS ntz#x, cast(i#x as interval year to month) AS i#x, cast(j#x as interval day to second) AS j#x]
+- Project [2011-05-06 07:08:09.1234567 AS c#x, to_timestamp_ntz(2011-05-06 07:08:09.1234567, None, TimestampNTZType, Some(America/Los_Angeles), false) AS ntz#x, INTERVAL '11-8' YEAR TO MONTH AS i#x, INTERVAL '31 16:50:06.789' DAY TO SECOND AS j#x]
+- OneRowRelation
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/group-analytics.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/group-analytics.sql.out
index c46fde114c36..b692c5c37463 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/group-analytics.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/group-analytics.sql.out
@@ -19,7 +19,7 @@ Aggregate [(a#x + b#x)#x, b#x, spark_grouping_id#xL], [(a#x + b#x)#x AS (a + b)#
+- Expand [[a#x, b#x, (a#x + b#x)#x, b#x, 0], [a#x, b#x, (a#x + b#x)#x, null, 1], [a#x, b#x, null, b#x, 2], [a#x, b#x, null, null, 3]], [a#x, b#x, (a#x + b#x)#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, (a#x + b#x) AS (a#x + b#x)#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -33,7 +33,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, sum(b#x) AS sum(b)#xL]
+- Expand [[a#x, b#x, a#x, b#x, 0], [a#x, b#x, a#x, null, 1], [a#x, b#x, null, b#x, 2], [a#x, b#x, null, null, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -47,7 +47,7 @@ Aggregate [(a#x + b#x)#x, b#x, spark_grouping_id#xL], [(a#x + b#x)#x AS (a + b)#
+- Expand [[a#x, b#x, (a#x + b#x)#x, b#x, 0], [a#x, b#x, (a#x + b#x)#x, null, 1], [a#x, b#x, null, null, 3]], [a#x, b#x, (a#x + b#x)#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, (a#x + b#x) AS (a#x + b#x)#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -61,7 +61,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, sum(b#x) AS sum(b)#xL]
+- Expand [[a#x, b#x, a#x, b#x, 0], [a#x, b#x, a#x, null, 1], [a#x, b#x, null, null, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -89,7 +89,7 @@ Sort [course#x ASC NULLS FIRST, year#x ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -104,7 +104,7 @@ Sort [course#x ASC NULLS FIRST, year#x ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0, 0], [course#x, year#x, earnings#x, course#x, year#x, 0, 1], [course#x, year#x, earnings#x, course#x, null, 1, 2], [course#x, year#x, earnings#x, null, null, 3, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -138,7 +138,7 @@ Sort [course#x ASC NULLS FIRST, year#x ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -153,7 +153,7 @@ Sort [course#x ASC NULLS FIRST, year#x ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0, 0], [course#x, year#x, earnings#x, course#x, year#x, 0, 1], [course#x, year#x, earnings#x, course#x, year#x, 0, 2], [course#x, year#x, earnings#x, course#x, null, 1, 3], [course#x, year#x, earnings#x, course#x, year#x, 0, 4], [course#x, year#x, earnings#x, null, year#x, 2, 5], [course#x, year#x, earnings#x, course#x, year#x, 0, 6], [course#x, year#x, earnings#x, null, null, 3, 7]], [course#x, year#x, earnings#x, course#x, [...]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -186,7 +186,7 @@ Aggregate [course#x, year#x, spark_grouping_id#xL], [course#x, year#x, sum(earni
+- Expand [[course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -200,7 +200,7 @@ Aggregate [course#x, year#x, spark_grouping_id#xL], [course#x, year#x, sum(earni
+- Expand [[course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -214,7 +214,7 @@ Aggregate [course#x, year#x, spark_grouping_id#xL], [course#x, year#x, sum(earni
+- Expand [[course#x, year#x, earnings#x, course#x, null, 1]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -228,7 +228,7 @@ Aggregate [course#x, year#x, spark_grouping_id#xL], [course#x, year#x, sum(earni
+- Expand [[course#x, year#x, earnings#x, null, year#x, 2]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -243,7 +243,7 @@ Sort [course#x ASC NULLS FIRST, year#x ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0, 0], [course#x, year#x, earnings#x, course#x, null, 1, 1], [course#x, year#x, earnings#x, course#x, year#x, 0, 2], [course#x, year#x, earnings#x, course#x, null, 1, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -258,7 +258,7 @@ Sort [course#x ASC NULLS FIRST, year#x ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0, 0], [course#x, year#x, earnings#x, course#x, year#x, 0, 1], [course#x, year#x, earnings#x, course#x, year#x, 0, 2], [course#x, year#x, earnings#x, course#x, year#x, 0, 3], [course#x, year#x, earnings#x, course#x, null, 1, 4], [course#x, year#x, earnings#x, course#x, null, 1, 5], [course#x, year#x, earnings#x, course#x, year#x, 0, 6], [course#x, year#x, earnings#x, course#x, year#x, 0, 7], [course#x, year#x, earnings#x, nul [...]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -273,7 +273,7 @@ Sort [course#x ASC NULLS FIRST, year#x ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0, 0], [course#x, year#x, earnings#x, course#x, year#x, 0, 1], [course#x, year#x, earnings#x, course#x, year#x, 0, 2], [course#x, year#x, earnings#x, course#x, year#x, 0, 3], [course#x, year#x, earnings#x, course#x, year#x, 0, 4], [course#x, year#x, earnings#x, course#x, year#x, 0, 5], [course#x, year#x, earnings#x, course#x, year#x, 0, 6], [course#x, year#x, earnings#x, course#x, year#x, 0, 7], [course#x, year#x, earnings#x, [...]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -289,7 +289,7 @@ Sort [course#x ASC NULLS FIRST, sum#xL ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, null, null, 3], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, course#x, earnings#x, 0]], [course#x, year#x, earnings#x, course#x, earnings#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, earnings#x AS earnings#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -305,7 +305,7 @@ Sort [course#x ASC NULLS FIRST, sum#xL ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, null, null, 3], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, course#x, earnings#x, 0]], [course#x, year#x, earnings#x, course#x, earnings#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, earnings#x AS earnings#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -320,7 +320,7 @@ Aggregate [course#x, year#x, spark_grouping_id#xL], [course#x, year#x, cast((shi
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -369,7 +369,7 @@ Sort [grouping__id#xL ASC NULLS FIRST, course#x ASC NULLS FIRST, year#x ASC NULL
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -387,7 +387,7 @@ Sort [course#x ASC NULLS FIRST, year#x ASC NULLS FIRST], true
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -423,7 +423,7 @@ Project [course#x, year#x]
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -440,7 +440,7 @@ Project [course#x, year#x, grouping(course)#x, grouping(year)#x]
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -457,7 +457,7 @@ Project [course#x, year#x, grouping_id(course, year)#xL]
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -493,7 +493,7 @@ Project [course#x, year#x]
+- Expand [[course#x, year#x, earnings#x, course#x, year#x, 0], [course#x, year#x, earnings#x, course#x, null, 1], [course#x, year#x, earnings#x, null, year#x, 2], [course#x, year#x, earnings#x, null, null, 3]], [course#x, year#x, earnings#x, course#x, year#x, spark_grouping_id#xL]
+- Project [course#x, year#x, earnings#x, course#x AS course#x, year#x AS year#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -507,7 +507,7 @@ Aggregate [k1#x, k2#x, spark_grouping_id#xL], [k1#x, k2#x, sum((a#x - b#x)) AS s
+- Expand [[a#x, b#x, k1#x, k2#x, 0], [a#x, b#x, k1#x, null, 1], [a#x, b#x, null, k2#x, 2], [a#x, b#x, null, null, 3]], [a#x, b#x, k1#x, k2#x, spark_grouping_id#xL]
+- Project [a#x, b#x, (a#x + b#x) AS k1#x, b#x AS k2#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -521,7 +521,7 @@ Aggregate [k#x, b#x, spark_grouping_id#xL], [k#x, b#x, sum((a#x - b#x)) AS sum((
+- Expand [[a#x, b#x, k#x, b#x, 0], [a#x, b#x, k#x, null, 1], [a#x, b#x, null, null, 3]], [a#x, b#x, k#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, (a#x + b#x) AS k#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -535,7 +535,7 @@ Aggregate [(a#x + b#x)#x, k#x, spark_grouping_id#xL], [(a#x + b#x)#x AS (a + b)#
+- Expand [[a#x, b#x, null, k#x, 2]], [a#x, b#x, (a#x + b#x)#x, k#x, spark_grouping_id#xL]
+- Project [a#x, b#x, (a#x + b#x) AS (a#x + b#x)#x, b#x AS k#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -549,7 +549,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, b#x, 0, 2], [a#x, b#x, a#x, b#x, 0, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -563,7 +563,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, b#x, 0, 2]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -577,7 +577,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, b#x, 0, 2], [a#x, b#x, a#x, b#x, 0, 3], [a#x, b#x, a#x, null, 1, 4], [a#x, b#x, a#x, null, 1, 5], [a#x, b#x, a#x, b#x, 0, 6], [a#x, b#x, a#x, b#x, 0, 7], [a#x, b#x, null, b#x, 2, 8], [a#x, b#x, a#x, b#x, 0, 9], [a#x, b#x, a#x, null, 1, 10], [a#x, b#x, null, null, 3, 11]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -591,7 +591,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, b#x, 0, 2], [a#x, b#x, a#x, null, 1, 3], [a#x, b#x, a#x, b#x, 0, 4], [a#x, b#x, a#x, b#x, 0, 5], [a#x, b#x, a#x, b#x, 0, 6], [a#x, b#x, a#x, null, 1, 7]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -605,7 +605,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, null, 1, 1], [a#x, b#x, a#x, null, 1, 2]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -619,7 +619,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, b#x, 0, 2], [a#x, b#x, a#x, b#x, 0, 3], [a#x, b#x, a#x, null, 1, 4], [a#x, b#x, a#x, null, 1, 5], [a#x, b#x, a#x, b#x, 0, 6], [a#x, b#x, a#x, b#x, 0, 7], [a#x, b#x, a#x, b#x, 0, 8], [a#x, b#x, a#x, b#x, 0, 9], [a#x, b#x, a#x, null, 1, 10], [a#x, b#x, a#x, null, 1, 11]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -633,7 +633,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, b#x, 0, 2], [a#x, b#x, a#x, b#x, 0, 3], [a#x, b#x, a#x, b#x, 0, 4], [a#x, b#x, a#x, b#x, 0, 5], [a#x, b#x, a#x, b#x, 0, 6], [a#x, b#x, a#x, b#x, 0, 7], [a#x, b#x, a#x, b#x, 0, 8], [a#x, b#x, a#x, b#x, 0, 9], [a#x, b#x, a#x, b#x, 0, 10], [a#x, b#x, a#x, b#x, 0, 11], [a#x, b#x, a#x, b#x, 0, 12], [a#x, b#x, a#x, null, 1, 13], [a#x, b#x, a#x, null, 1, 14], [a#x, b#x, a#x, b#x, 0, 15], [a#x, b#x, a#x, null, 1, [...]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -647,7 +647,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, null, 1, 1], [a#x, b#x, a#x, null, 1, 2]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -661,7 +661,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, null, 1, 1], [a#x, b#x, a#x, null, 1, 2]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -675,7 +675,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, null, 1, 2], [a#x, b#x, a#x, null, 1, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -689,7 +689,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, b#x, 0, 2]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -703,7 +703,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, b#x, 0, 1], [a#x, b#x, a#x, b#x, 0, 2]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -717,7 +717,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, null, 1, 1], [a#x, b#x, a#x, null, 1, 2], [a#x, b#x, a#x, b#x, 0, 3], [a#x, b#x, a#x, null, 1, 4], [a#x, b#x, a#x, b#x, 0, 5], [a#x, b#x, a#x, null, 1, 6]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -731,7 +731,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, null, 1, 1], [a#x, b#x, a#x, null, 1, 2], [a#x, b#x, a#x, b#x, 0, 3], [a#x, b#x, a#x, null, 1, 4], [a#x, b#x, a#x, b#x, 0, 5], [a#x, b#x, a#x, null, 1, 6]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -745,7 +745,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x], [a#x, b#x, coun
+- Expand [[a#x, b#x, a#x, b#x, 0, 0], [a#x, b#x, a#x, null, 1, 1], [a#x, b#x, a#x, null, 1, 2], [a#x, b#x, a#x, b#x, 0, 3], [a#x, b#x, a#x, null, 1, 4], [a#x, b#x, a#x, b#x, 0, 5], [a#x, b#x, a#x, null, 1, 6]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL, _gen_grouping_pos#x]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all-duckdb.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all-duckdb.sql.out
index 59ecafccbeb4..13649989b412 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all-duckdb.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all-duckdb.sql.out
@@ -24,7 +24,7 @@ SELECT g, SUM(i) FROM integers GROUP BY ALL ORDER BY 1
Sort [g#x ASC NULLS FIRST], true
+- Aggregate [g#x], [g#x, sum(i#x) AS sum(i)#xL]
+- SubqueryAlias integers
- +- View (`integers`, [g#x,i#x])
+ +- View (`integers`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias integers
@@ -37,7 +37,7 @@ SELECT g, SUM(i), COUNT(*), COUNT(i), SUM(g) FROM integers GROUP BY ALL ORDER BY
Sort [g#x ASC NULLS FIRST], true
+- Aggregate [g#x], [g#x, sum(i#x) AS sum(i)#xL, count(1) AS count(1)#xL, count(i#x) AS count(i)#xL, sum(g#x) AS sum(g)#xL]
+- SubqueryAlias integers
- +- View (`integers`, [g#x,i#x])
+ +- View (`integers`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias integers
@@ -50,7 +50,7 @@ SELECT i%2, SUM(i), SUM(g) FROM integers GROUP BY ALL ORDER BY 1
Sort [(i % 2)#x ASC NULLS FIRST], true
+- Aggregate [(i#x % 2)], [(i#x % 2) AS (i % 2)#x, sum(i#x) AS sum(i)#xL, sum(g#x) AS sum(g)#xL]
+- SubqueryAlias integers
- +- View (`integers`, [g#x,i#x])
+ +- View (`integers`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias integers
@@ -63,7 +63,7 @@ SELECT (g+i)%2, SUM(i), SUM(g) FROM integers GROUP BY ALL ORDER BY 1
Sort [((g + i) % 2)#x ASC NULLS FIRST], true
+- Aggregate [((g#x + i#x) % 2)], [((g#x + i#x) % 2) AS ((g + i) % 2)#x, sum(i#x) AS sum(i)#xL, sum(g#x) AS sum(g)#xL]
+- SubqueryAlias integers
- +- View (`integers`, [g#x,i#x])
+ +- View (`integers`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias integers
@@ -93,7 +93,7 @@ SELECT g, i, g%2, SUM(i), SUM(g) FROM integers GROUP BY ALL ORDER BY 1, 2, 3, 4
Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST, (g % 2)#x ASC NULLS FIRST, sum(i)#xL ASC NULLS FIRST], true
+- Aggregate [g#x, i#x, (g#x % 2)], [g#x, i#x, (g#x % 2) AS (g % 2)#x, sum(i#x) AS sum(i)#xL, sum(g#x) AS sum(g)#xL]
+- SubqueryAlias integers
- +- View (`integers`, [g#x,i#x])
+ +- View (`integers`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias integers
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all-mosha.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all-mosha.sql.out
index f63f3e8c8452..76ef52ecd8b6 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all-mosha.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all-mosha.sql.out
@@ -22,7 +22,7 @@ SELECT 100 * SUM(i) + SUM(f) / COUNT(s) AS f1, i AS f2 FROM stuff GROUP BY ALL O
Sort [f2#x ASC NULLS FIRST], true
+- Aggregate [i#x], [(cast((cast(100 as bigint) * sum(i#x)) as decimal(20,0)) + (sum(f#x) / cast(count(s#x) as decimal(20,0)))) AS f1#x, i#x AS f2#x]
+- SubqueryAlias stuff
- +- View (`stuff`, [i#x,f#x,s#x,t#x,d#x,a#x])
+ +- View (`stuff`, [i#x, f#x, s#x, t#x, d#x, a#x])
+- Project [cast(i#x as int) AS i#x, cast(f#x as decimal(6,4)) AS f#x, cast(s#x as string) AS s#x, cast(t#x as string) AS t#x, cast(d#x as string) AS d#x, cast(a#x as array<int>) AS a#x]
+- Project [i#x, f#x, s#x, t#x, d#x, a#x]
+- SubqueryAlias stuff
@@ -35,7 +35,7 @@ SELECT i + 1 AS i1, COUNT(i - 2) ci, f / i AS fi, SUM(i + f) sif FROM stuff GROU
Sort [i1#x ASC NULLS FIRST, fi#x ASC NULLS FIRST], true
+- Aggregate [(i#x + 1), (f#x / cast(i#x as decimal(10,0)))], [(i#x + 1) AS i1#x, count((i#x - 2)) AS ci#xL, (f#x / cast(i#x as decimal(10,0))) AS fi#x, sum((cast(i#x as decimal(10,0)) + f#x)) AS sif#x]
+- SubqueryAlias stuff
- +- View (`stuff`, [i#x,f#x,s#x,t#x,d#x,a#x])
+ +- View (`stuff`, [i#x, f#x, s#x, t#x, d#x, a#x])
+- Project [cast(i#x as int) AS i#x, cast(f#x as decimal(6,4)) AS f#x, cast(s#x as string) AS s#x, cast(t#x as string) AS t#x, cast(d#x as string) AS d#x, cast(a#x as array<int>) AS a#x]
+- Project [i#x, f#x, s#x, t#x, d#x, a#x]
+- SubqueryAlias stuff
@@ -48,7 +48,7 @@ SELECT i AS i, COUNT(i) ci, f AS f, SUM(i + f) sif FROM stuff GROUP BY ALL ORDER
Sort [i#x ASC NULLS FIRST, i#x ASC NULLS FIRST, ci#xL ASC NULLS FIRST, ci#xL ASC NULLS FIRST, f#x ASC NULLS FIRST, f#x ASC NULLS FIRST, sif#x ASC NULLS FIRST, sif#x ASC NULLS FIRST], true
+- Aggregate [i#x, f#x], [i#x AS i#x, count(i#x) AS ci#xL, f#x AS f#x, sum((cast(i#x as decimal(10,0)) + f#x)) AS sif#x]
+- SubqueryAlias stuff
- +- View (`stuff`, [i#x,f#x,s#x,t#x,d#x,a#x])
+ +- View (`stuff`, [i#x, f#x, s#x, t#x, d#x, a#x])
+- Project [cast(i#x as int) AS i#x, cast(f#x as decimal(6,4)) AS f#x, cast(s#x as string) AS s#x, cast(t#x as string) AS t#x, cast(d#x as string) AS d#x, cast(a#x as array<int>) AS a#x]
+- Project [i#x, f#x, s#x, t#x, d#x, a#x]
+- SubqueryAlias stuff
@@ -62,7 +62,7 @@ GROUP BY ALL ORDER BY 1, 3, 4, 5, 6, 2
Sort [(i + 1)#x ASC NULLS FIRST, substring(s, 2, 3)#x ASC NULLS FIRST, extract(year FROM t)#x ASC NULLS FIRST, (d / 2)#x ASC NULLS FIRST, size(a)#x ASC NULLS FIRST, (f / i)#x ASC NULLS FIRST], true
+- Aggregate [(i#x + 1), (f#x / cast(i#x as decimal(10,0))), substring(s#x, 2, 3), extract(year, t#x), (cast(d#x as double) / cast(2 as double)), size(a#x, true)], [(i#x + 1) AS (i + 1)#x, (f#x / cast(i#x as decimal(10,0))) AS (f / i)#x, substring(s#x, 2, 3) AS substring(s, 2, 3)#x, extract(year, t#x) AS extract(year FROM t)#x, (cast(d#x as double) / cast(2 as double)) AS (d / 2)#x, size(a#x, true) AS size(a)#x]
+- SubqueryAlias stuff
- +- View (`stuff`, [i#x,f#x,s#x,t#x,d#x,a#x])
+ +- View (`stuff`, [i#x, f#x, s#x, t#x, d#x, a#x])
+- Project [cast(i#x as int) AS i#x, cast(f#x as decimal(6,4)) AS f#x, cast(s#x as string) AS s#x, cast(t#x as string) AS t#x, cast(d#x as string) AS d#x, cast(a#x as array<int>) AS a#x]
+- Project [i#x, f#x, s#x, t#x, d#x, a#x]
+- SubqueryAlias stuff
@@ -94,7 +94,7 @@ Sort [s#x ASC NULLS FIRST], true
+- Filter (sum(f#x)#x > cast(cast(0 as decimal(1,0)) as decimal(16,4)))
+- Aggregate [s#x], [s#x AS s#x, count(1) AS c#xL, sum(f#x) AS sum(f#x)#x]
+- SubqueryAlias stuff
- +- View (`stuff`, [i#x,f#x,s#x,t#x,d#x,a#x])
+ +- View (`stuff`, [i#x, f#x, s#x, t#x, d#x, a#x])
+- Project [cast(i#x as int) AS i#x, cast(f#x as decimal(6,4)) AS f#x, cast(s#x as string) AS s#x, cast(t#x as string) AS t#x, cast(d#x as string) AS d#x, cast(a#x as array<int>) AS a#x]
+- Project [i#x, f#x, s#x, t#x, d#x, a#x]
+- SubqueryAlias stuff
@@ -107,7 +107,7 @@ SELECT SUM(i) si FROM stuff GROUP BY ALL HAVING si > 2
Filter (si#xL > cast(2 as bigint))
+- Aggregate [sum(i#x) AS si#xL]
+- SubqueryAlias stuff
- +- View (`stuff`, [i#x,f#x,s#x,t#x,d#x,a#x])
+ +- View (`stuff`, [i#x, f#x, s#x, t#x, d#x, a#x])
+- Project [cast(i#x as int) AS i#x, cast(f#x as decimal(6,4)) AS f#x, cast(s#x as string) AS s#x, cast(t#x as string) AS t#x, cast(d#x as string) AS d#x, cast(a#x as array<int>) AS a#x]
+- Project [i#x, f#x, s#x, t#x, d#x, a#x]
+- SubqueryAlias stuff
@@ -120,7 +120,7 @@ SELECT SUM(i) si FROM stuff GROUP BY ALL HAVING si < 2
Filter (si#xL < cast(2 as bigint))
+- Aggregate [sum(i#x) AS si#xL]
+- SubqueryAlias stuff
- +- View (`stuff`, [i#x,f#x,s#x,t#x,d#x,a#x])
+ +- View (`stuff`, [i#x, f#x, s#x, t#x, d#x, a#x])
+- Project [cast(i#x as int) AS i#x, cast(f#x as decimal(6,4)) AS f#x, cast(s#x as string) AS s#x, cast(t#x as string) AS t#x, cast(d#x as string) AS d#x, cast(a#x as array<int>) AS a#x]
+- Project [i#x, f#x, s#x, t#x, d#x, a#x]
+- SubqueryAlias stuff
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all.sql.out
index 529141e06935..79de44697b5f 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-all.sql.out
@@ -29,7 +29,7 @@ select country, count(*) from data group by ALL
-- !query analysis
Aggregate [country#x], [country#x, count(1) AS count(1)#xL]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -41,7 +41,7 @@ select country, count(*) from data group by aLl
-- !query analysis
Aggregate [country#x], [country#x, count(1) AS count(1)#xL]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -55,7 +55,7 @@ Aggregate [all#x, city#x], [all#x, city#x, count(1) AS count(1)#xL]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [country#x AS all#x, city#x, id#x]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -75,7 +75,7 @@ select country, city, count(*), sum(power) from data group by all
-- !query analysis
Aggregate [country#x, city#x], [country#x, city#x, count(1) AS count(1)#xL, sum(power#x) AS sum(power)#x]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -87,7 +87,7 @@ select count(*), country, city, sum(power) from data group by all
-- !query analysis
Aggregate [country#x, city#x], [count(1) AS count(1)#xL, country#x, city#x, sum(power#x) AS sum(power)#x]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -99,7 +99,7 @@ select country as con, count(*) from data group by all
-- !query analysis
Aggregate [country#x], [country#x AS con#x, count(1) AS count(1)#xL]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -111,7 +111,7 @@ select country, count(*) as cnt from data group by all
-- !query analysis
Aggregate [country#x], [country#x, count(1) AS cnt#xL]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -123,7 +123,7 @@ select upper(country), count(*) as powerup from data group by all
-- !query analysis
Aggregate [upper(country#x)], [upper(country#x) AS upper(country)#x, count(1) AS powerup#xL]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -135,7 +135,7 @@ select country, sum(power) + 10 as powerup from data group by all
-- !query analysis
Aggregate [country#x], [country#x, (sum(power#x) + cast(10 as decimal(2,0))) AS powerup#x]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -147,7 +147,7 @@ select country, city from data group by all
-- !query analysis
Aggregate [country#x, city#x], [country#x, city#x]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -162,7 +162,7 @@ Project [con#x, powerup#x]
+- SubqueryAlias __auto_generated_subquery_name
+- Aggregate [country#x], [country#x AS con#x, (sum(power#x) + cast(10 as decimal(2,0))) AS powerup#x]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -175,7 +175,7 @@ select country, count(id) as cnt from data group by all having cnt > 1
Filter (cnt#xL > cast(1 as bigint))
+- Aggregate [country#x], [country#x, count(id#x) AS cnt#xL]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -187,7 +187,7 @@ select count(id) from data group by all
-- !query analysis
Aggregate [count(id#x) AS count(id)#xL]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -199,7 +199,7 @@ select count(id + power / 2) * 3 from data group by all
-- !query analysis
Aggregate [(count((cast(id#x as decimal(10,0)) + (power#x / cast(2 as decimal(1,0))))) * cast(3 as bigint)) AS (count((id + (power / 2))) * 3)#xL]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -214,7 +214,7 @@ Aggregate [count(1) AS count(1)#xL]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- Filter (country#x = DNS)
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -261,20 +261,20 @@ select country, (select count(*) from data) as cnt, count(id) as cnt_id from dat
Aggregate [country#x, scalar-subquery#x []], [country#x, scalar-subquery#x [] AS cnt#xL, count(id#x) AS cnt_id#xL]
: :- Aggregate [count(1) AS count(1)#xL]
: : +- SubqueryAlias data
-: : +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+: : +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
: : +- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
: : +- Project [country#x, city#x, name#x, id#x, power#x]
: : +- SubqueryAlias data
: : +- LocalRelation [country#x, city#x, name#x, id#x, power#x]
: +- Aggregate [count(1) AS count(1)#xL]
: +- SubqueryAlias data
-: +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+: +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
: +- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
: +- Project [country#x, city#x, name#x, id#x, power#x]
: +- SubqueryAlias data
: +- LocalRelation [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
@@ -289,7 +289,7 @@ Aggregate [country#x, scalar-subquery#x [country#x]], [country#x, scalar-subquer
: : +- Filter (country#x = outer(country#x))
: : +- SubqueryAlias d1
: : +- SubqueryAlias data
-: : +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+: : +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
: : +- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
: : +- Project [country#x, city#x, name#x, id#x, power#x]
: : +- SubqueryAlias data
@@ -298,14 +298,14 @@ Aggregate [country#x, scalar-subquery#x [country#x]], [country#x, scalar-subquer
: +- Filter (country#x = outer(country#x))
: +- SubqueryAlias d1
: +- SubqueryAlias data
-: +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+: +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
: +- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
: +- Project [country#x, city#x, name#x, id#x, power#x]
: +- SubqueryAlias data
: +- LocalRelation [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias d2
+- SubqueryAlias data
- +- View (`data`, [country#x,city#x,name#x,id#x,power#x])
+ +- View (`data`, [country#x, city#x, name#x, id#x, power#x])
+- Project [cast(country#x as string) AS country#x, cast(city#x as string) AS city#x, cast(name#x as string) AS name#x, cast(id#x as int) AS id#x, cast(power#x as decimal(3,1)) AS power#x]
+- Project [country#x, city#x, name#x, id#x, power#x]
+- SubqueryAlias data
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-filter.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-filter.sql.out
index df2e409fafe7..780a936fa619 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-filter.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-filter.sql.out
@@ -86,7 +86,7 @@ SELECT COUNT(a) FILTER (WHERE a = 1), COUNT(b) FILTER (WHERE a > 1) FROM testDat
-- !query analysis
Aggregate [count(a#x) FILTER (WHERE (a#x = 1)) AS count(a) FILTER (WHERE (a = 1))#xL, count(b#x) FILTER (WHERE (a#x > 1)) AS count(b) FILTER (WHERE (a > 1))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -104,7 +104,7 @@ SELECT COUNT(id) FILTER (WHERE hiredate = to_date('2001-01-01 00:00:00')) FROM e
-- !query analysis
Aggregate [count(id#x) FILTER (WHERE (hiredate#x = to_date(2001-01-01 00:00:00, None, Some(America/Los_Angeles), false))) AS count(id) FILTER (WHERE (hiredate = to_date(2001-01-01 00:00:00)))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -116,7 +116,7 @@ SELECT COUNT(id) FILTER (WHERE hiredate = to_timestamp("2001-01-01 00:00:00")) F
-- !query analysis
Aggregate [count(id#x) FILTER (WHERE (cast(hiredate#x as timestamp) = to_timestamp(2001-01-01 00:00:00, None, TimestampType, Some(America/Los_Angeles), false))) AS count(id) FILTER (WHERE (hiredate = to_timestamp(2001-01-01 00:00:00)))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -128,7 +128,7 @@ SELECT COUNT(id) FILTER (WHERE date_format(hiredate, "yyyy-MM-dd") = "2001-01-01
-- !query analysis
Aggregate [count(id#x) FILTER (WHERE (date_format(cast(hiredate#x as timestamp), yyyy-MM-dd, Some(America/Los_Angeles)) = 2001-01-01)) AS count(id) FILTER (WHERE (date_format(hiredate, yyyy-MM-dd) = 2001-01-01))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -140,7 +140,7 @@ SELECT COUNT(DISTINCT id) FILTER (WHERE date_format(hiredate, "yyyy-MM-dd HH:mm:
-- !query analysis
Aggregate [count(distinct id#x) FILTER (WHERE (date_format(cast(hiredate#x as timestamp), yyyy-MM-dd HH:mm:ss, Some(America/Los_Angeles)) = 2001-01-01 00:00:00)) AS count(DISTINCT id) FILTER (WHERE (date_format(hiredate, yyyy-MM-dd HH:mm:ss) = 2001-01-01 00:00:00))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -152,7 +152,7 @@ SELECT COUNT(DISTINCT id), COUNT(DISTINCT id) FILTER (WHERE date_format(hiredate
-- !query analysis
Aggregate [count(distinct id#x) AS count(DISTINCT id)#xL, count(distinct id#x) FILTER (WHERE (date_format(cast(hiredate#x as timestamp), yyyy-MM-dd HH:mm:ss, Some(America/Los_Angeles)) = 2001-01-01 00:00:00)) AS count(DISTINCT id) FILTER (WHERE (date_format(hiredate, yyyy-MM-dd HH:mm:ss) = 2001-01-01 00:00:00))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -164,7 +164,7 @@ SELECT COUNT(DISTINCT id) FILTER (WHERE hiredate = to_timestamp("2001-01-01 00:0
-- !query analysis
Aggregate [count(distinct id#x) FILTER (WHERE (cast(hiredate#x as timestamp) = to_timestamp(2001-01-01 00:00:00, None, TimestampType, Some(America/Los_Angeles), false))) AS count(DISTINCT id) FILTER (WHERE (hiredate = to_timestamp(2001-01-01 00:00:00)))#xL, count(distinct id#x) FILTER (WHERE (hiredate#x = to_date(2001-01-01 00:00:00, None, Some(America/Los_Angeles), false))) AS count(DISTINCT id) FILTER (WHERE (hiredate = to_date(2001-01-01 00:00:00)))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -182,7 +182,7 @@ SELECT COUNT(DISTINCT 1) FILTER (WHERE a = 1) FROM testData
-- !query analysis
Aggregate [count(distinct 1) FILTER (WHERE (a#x = 1)) AS count(DISTINCT 1) FILTER (WHERE (a = 1))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -194,7 +194,7 @@ SELECT COUNT(DISTINCT id) FILTER (WHERE true) FROM emp
-- !query analysis
Aggregate [count(distinct id#x) FILTER (WHERE true) AS count(DISTINCT id) FILTER (WHERE true)#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -206,7 +206,7 @@ SELECT COUNT(DISTINCT id) FILTER (WHERE false) FROM emp
-- !query analysis
Aggregate [count(distinct id#x) FILTER (WHERE false) AS count(DISTINCT id) FILTER (WHERE false)#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -218,7 +218,7 @@ SELECT COUNT(DISTINCT 2), COUNT(DISTINCT 2,3) FILTER (WHERE dept_id = 40) FROM e
-- !query analysis
Aggregate [count(distinct 2) AS count(DISTINCT 2)#xL, count(distinct 2, 3) FILTER (WHERE (dept_id#x = 40)) AS count(DISTINCT 2, 3) FILTER (WHERE (dept_id = 40))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -230,7 +230,7 @@ SELECT COUNT(DISTINCT 2), COUNT(DISTINCT 3,2) FILTER (WHERE dept_id = 40) FROM e
-- !query analysis
Aggregate [count(distinct 2) AS count(DISTINCT 2)#xL, count(distinct 3, 2) FILTER (WHERE (dept_id#x = 40)) AS count(DISTINCT 3, 2) FILTER (WHERE (dept_id = 40))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -242,7 +242,7 @@ SELECT COUNT(DISTINCT 2), COUNT(DISTINCT 2,3) FILTER (WHERE dept_id > 0) FROM em
-- !query analysis
Aggregate [count(distinct 2) AS count(DISTINCT 2)#xL, count(distinct 2, 3) FILTER (WHERE (dept_id#x > 0)) AS count(DISTINCT 2, 3) FILTER (WHERE (dept_id > 0))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -254,7 +254,7 @@ SELECT COUNT(DISTINCT 2), COUNT(DISTINCT 3,2) FILTER (WHERE dept_id > 0) FROM em
-- !query analysis
Aggregate [count(distinct 2) AS count(DISTINCT 2)#xL, count(distinct 3, 2) FILTER (WHERE (dept_id#x > 0)) AS count(DISTINCT 3, 2) FILTER (WHERE (dept_id > 0))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -266,7 +266,7 @@ SELECT COUNT(DISTINCT id), COUNT(DISTINCT 2,3) FILTER (WHERE dept_id = 40) FROM
-- !query analysis
Aggregate [count(distinct id#x) AS count(DISTINCT id)#xL, count(distinct 2, 3) FILTER (WHERE (dept_id#x = 40)) AS count(DISTINCT 2, 3) FILTER (WHERE (dept_id = 40))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -278,7 +278,7 @@ SELECT COUNT(DISTINCT id), COUNT(DISTINCT 3,2) FILTER (WHERE dept_id = 40) FROM
-- !query analysis
Aggregate [count(distinct id#x) AS count(DISTINCT id)#xL, count(distinct 3, 2) FILTER (WHERE (dept_id#x = 40)) AS count(DISTINCT 3, 2) FILTER (WHERE (dept_id = 40))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -290,7 +290,7 @@ SELECT COUNT(DISTINCT id), COUNT(DISTINCT 2,3) FILTER (WHERE dept_id > 0) FROM e
-- !query analysis
Aggregate [count(distinct id#x) AS count(DISTINCT id)#xL, count(distinct 2, 3) FILTER (WHERE (dept_id#x > 0)) AS count(DISTINCT 2, 3) FILTER (WHERE (dept_id > 0))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -302,7 +302,7 @@ SELECT COUNT(DISTINCT id), COUNT(DISTINCT 3,2) FILTER (WHERE dept_id > 0) FROM e
-- !query analysis
Aggregate [count(distinct id#x) AS count(DISTINCT id)#xL, count(distinct 3, 2) FILTER (WHERE (dept_id#x > 0)) AS count(DISTINCT 3, 2) FILTER (WHERE (dept_id > 0))#xL]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -314,7 +314,7 @@ SELECT a, COUNT(b) FILTER (WHERE a >= 2) FROM testData GROUP BY a
-- !query analysis
Aggregate [a#x], [a#x, count(b#x) FILTER (WHERE (a#x >= 2)) AS count(b) FILTER (WHERE (a >= 2))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -340,7 +340,7 @@ SELECT COUNT(a) FILTER (WHERE a >= 0), COUNT(b) FILTER (WHERE a >= 3) FROM testD
-- !query analysis
Aggregate [a#x], [count(a#x) FILTER (WHERE (a#x >= 0)) AS count(a) FILTER (WHERE (a >= 0))#xL, count(b#x) FILTER (WHERE (a#x >= 3)) AS count(b) FILTER (WHERE (a >= 3))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -358,7 +358,7 @@ SELECT dept_id, SUM(salary) FILTER (WHERE hiredate > to_date("2003-01-01")) FROM
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, sum(salary#x) FILTER (WHERE (hiredate#x > to_date(2003-01-01, None, Some(America/Los_Angeles), false))) AS sum(salary) FILTER (WHERE (hiredate > to_date(2003-01-01)))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -370,7 +370,7 @@ SELECT dept_id, SUM(salary) FILTER (WHERE hiredate > to_timestamp("2003-01-01 00
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, sum(salary#x) FILTER (WHERE (cast(hiredate#x as timestamp) > to_timestamp(2003-01-01 00:00:00, None, TimestampType, Some(America/Los_Angeles), false))) AS sum(salary) FILTER (WHERE (hiredate > to_timestamp(2003-01-01 00:00:00)))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -382,7 +382,7 @@ SELECT dept_id, SUM(salary) FILTER (WHERE date_format(hiredate, "yyyy-MM-dd") >
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, sum(salary#x) FILTER (WHERE (date_format(cast(hiredate#x as timestamp), yyyy-MM-dd, Some(America/Los_Angeles)) > 2003-01-01)) AS sum(salary) FILTER (WHERE (date_format(hiredate, yyyy-MM-dd) > 2003-01-01))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -394,7 +394,7 @@ SELECT dept_id, SUM(DISTINCT salary) FILTER (WHERE date_format(hiredate, "yyyy-M
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, sum(distinct salary#x) FILTER (WHERE (date_format(cast(hiredate#x as timestamp), yyyy-MM-dd HH:mm:ss, Some(America/Los_Angeles)) > 2001-01-01 00:00:00)) AS sum(DISTINCT salary) FILTER (WHERE (date_format(hiredate, yyyy-MM-dd HH:mm:ss) > 2001-01-01 00:00:00))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -406,7 +406,7 @@ SELECT dept_id, SUM(DISTINCT salary), SUM(DISTINCT salary) FILTER (WHERE date_fo
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, sum(distinct salary#x) AS sum(DISTINCT salary)#x, sum(distinct salary#x) FILTER (WHERE (date_format(cast(hiredate#x as timestamp), yyyy-MM-dd HH:mm:ss, Some(America/Los_Angeles)) > 2001-01-01 00:00:00)) AS sum(DISTINCT salary) FILTER (WHERE (date_format(hiredate, yyyy-MM-dd HH:mm:ss) > 2001-01-01 00:00:00))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -424,7 +424,7 @@ SELECT dept_id, COUNT(id), SUM(DISTINCT salary), SUM(DISTINCT salary) FILTER (WH
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(id#x) AS count(id)#xL, sum(distinct salary#x) AS sum(DISTINCT salary)#x, sum(distinct salary#x) FILTER (WHERE (date_format(cast(hiredate#x as timestamp), yyyy-MM-dd, Some(America/Los_Angeles)) > 2001-01-01)) AS sum(DISTINCT salary) FILTER (WHERE (date_format(hiredate, yyyy-MM-dd) > 2001-01-01))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -436,7 +436,7 @@ SELECT b, COUNT(DISTINCT 1) FILTER (WHERE a = 1) FROM testData GROUP BY b
-- !query analysis
Aggregate [b#x], [b#x, count(distinct 1) FILTER (WHERE (a#x = 1)) AS count(DISTINCT 1) FILTER (WHERE (a = 1))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -448,7 +448,7 @@ SELECT 'foo', COUNT(a) FILTER (WHERE b <= 2) FROM testData GROUP BY 1
-- !query analysis
Aggregate [foo], [foo AS foo#x, count(a#x) FILTER (WHERE (b#x <= 2)) AS count(a) FILTER (WHERE (b <= 2))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -466,7 +466,7 @@ SELECT 'foo', SUM(salary) FILTER (WHERE hiredate >= to_date("2003-01-01")) FROM
-- !query analysis
Aggregate [foo], [foo AS foo#x, sum(salary#x) FILTER (WHERE (hiredate#x >= to_date(2003-01-01, None, Some(America/Los_Angeles), false))) AS sum(salary) FILTER (WHERE (hiredate >= to_date(2003-01-01)))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -478,7 +478,7 @@ SELECT 'foo', SUM(salary) FILTER (WHERE hiredate >= to_timestamp("2003-01-01"))
-- !query analysis
Aggregate [foo], [foo AS foo#x, sum(salary#x) FILTER (WHERE (cast(hiredate#x as timestamp) >= to_timestamp(2003-01-01, None, TimestampType, Some(America/Los_Angeles), false))) AS sum(salary) FILTER (WHERE (hiredate >= to_timestamp(2003-01-01)))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -490,7 +490,7 @@ select dept_id, count(distinct emp_name), count(distinct hiredate), sum(salary),
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, count(distinct hiredate#x) AS count(DISTINCT hiredate)#xL, sum(salary#x) AS sum(salary)#x, sum(salary#x) FILTER (WHERE (id#x > 200)) AS sum(salary) FILTER (WHERE (id > 200))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -502,7 +502,7 @@ select dept_id, count(distinct emp_name), count(distinct hiredate), sum(salary),
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, count(distinct hiredate#x) AS count(DISTINCT hiredate)#xL, sum(salary#x) AS sum(salary)#x, sum(salary#x) FILTER (WHERE ((id#x + dept_id#x) > 500)) AS sum(salary) FILTER (WHERE ((id + dept_id) > 500))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -514,7 +514,7 @@ select dept_id, count(distinct emp_name), count(distinct hiredate), sum(salary)
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, count(distinct hiredate#x) AS count(DISTINCT hiredate)#xL, sum(salary#x) FILTER (WHERE (salary#x < 400.0)) AS sum(salary) FILTER (WHERE (salary < 400.0))#x, sum(salary#x) FILTER (WHERE (id#x > 200)) AS sum(salary) FILTER (WHERE (id > 200))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -526,7 +526,7 @@ select dept_id, count(distinct emp_name), count(distinct hiredate), sum(salary)
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, count(distinct hiredate#x) AS count(DISTINCT hiredate)#xL, sum(salary#x) FILTER (WHERE (salary#x < 400.0)) AS sum(salary) FILTER (WHERE (salary < 400.0))#x, sum(salary#x) FILTER (WHERE ((id#x + dept_id#x) > 500)) AS sum(salary) FILTER (WHERE ((id + dept_id) > 500))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -538,7 +538,7 @@ select dept_id, count(distinct emp_name) filter (where id > 200), sum(salary) fr
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) FILTER (WHERE (id#x > 200)) AS count(DISTINCT emp_name) FILTER (WHERE (id > 200))#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -550,7 +550,7 @@ select dept_id, count(distinct emp_name) filter (where id + dept_id > 500), sum(
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) FILTER (WHERE ((id#x + dept_id#x) > 500)) AS count(DISTINCT emp_name) FILTER (WHERE ((id + dept_id) > 500))#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -562,7 +562,7 @@ select dept_id, count(distinct emp_name), count(distinct emp_name) filter (where
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, count(distinct emp_name#x) FILTER (WHERE (id#x > 200)) AS count(DISTINCT emp_name) FILTER (WHERE (id > 200))#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -574,7 +574,7 @@ select dept_id, count(distinct emp_name), count(distinct emp_name) filter (where
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, count(distinct emp_name#x) FILTER (WHERE ((id#x + dept_id#x) > 500)) AS count(DISTINCT emp_name) FILTER (WHERE ((id + dept_id) > 500))#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -586,7 +586,7 @@ select dept_id, count(distinct emp_name), count(distinct emp_name) filter (where
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, count(distinct emp_name#x) FILTER (WHERE (id#x > 200)) AS count(DISTINCT emp_name) FILTER (WHERE (id > 200))#xL, sum(salary#x) AS sum(salary)#x, sum(salary#x) FILTER (WHERE (id#x > 200)) AS sum(salary) FILTER (WHERE (id > 200))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -598,7 +598,7 @@ select dept_id, count(distinct emp_name), count(distinct emp_name) filter (where
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, count(distinct emp_name#x) FILTER (WHERE ((id#x + dept_id#x) > 500)) AS count(DISTINCT emp_name) FILTER (WHERE ((id + dept_id) > 500))#xL, sum(salary#x) AS sum(salary)#x, sum(salary#x) FILTER (WHERE (id#x > 200)) AS sum(salary) FILTER (WHERE (id > 200))#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -610,7 +610,7 @@ select dept_id, count(distinct emp_name) filter (where id > 200), count(distinct
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) FILTER (WHERE (id#x > 200)) AS count(DISTINCT emp_name) FILTER (WHERE (id > 200))#xL, count(distinct hiredate#x) AS count(DISTINCT hiredate)#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -640,7 +640,7 @@ select dept_id, count(distinct emp_name) filter (where id > 200), count(distinct
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x) FILTER (WHERE (id#x > 200)) AS count(DISTINCT emp_name) FILTER (WHERE (id > 200))#xL, count(distinct emp_name#x) AS count(DISTINCT emp_name)#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -658,7 +658,7 @@ select dept_id, sum(distinct (id + dept_id)) filter (where id > 200), count(dist
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, sum(distinct (id#x + dept_id#x)) FILTER (WHERE (id#x > 200)) AS sum(DISTINCT (id + dept_id)) FILTER (WHERE (id > 200))#xL, count(distinct hiredate#x) AS count(DISTINCT hiredate)#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -682,7 +682,7 @@ select dept_id, count(distinct emp_name, hiredate) filter (where id > 200), sum(
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x, hiredate#x) FILTER (WHERE (id#x > 200)) AS count(DISTINCT emp_name, hiredate) FILTER (WHERE (id > 200))#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -694,7 +694,7 @@ select dept_id, count(distinct emp_name, hiredate) filter (where id > 0), sum(sa
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct emp_name#x, hiredate#x) FILTER (WHERE (id#x > 0)) AS count(DISTINCT emp_name, hiredate) FILTER (WHERE (id > 0))#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -706,7 +706,7 @@ select dept_id, count(distinct 1), count(distinct 1) filter (where id > 200), su
-- !query analysis
Aggregate [dept_id#x], [dept_id#x, count(distinct 1) AS count(DISTINCT 1)#xL, count(distinct 1) FILTER (WHERE (id#x > 200)) AS count(DISTINCT 1) FILTER (WHERE (id > 200))#xL, sum(salary#x) AS sum(salary)#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -719,7 +719,7 @@ SELECT 'foo', APPROX_COUNT_DISTINCT(a) FILTER (WHERE b >= 0) FROM testData WHERE
Aggregate [foo], [foo AS foo#x, approx_count_distinct(a#x, 0.05, 0, 0) FILTER (WHERE (b#x >= 0)) AS approx_count_distinct(a) FILTER (WHERE (b >= 0))#xL]
+- Filter (a#x = 0)
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -732,7 +732,7 @@ SELECT 'foo', MAX(STRUCT(a)) FILTER (WHERE b >= 1) FROM testData WHERE a = 0 GRO
Aggregate [foo], [foo AS foo#x, max(struct(a, a#x)) FILTER (WHERE (b#x >= 1)) AS max(struct(a)) FILTER (WHERE (b >= 1))#x]
+- Filter (a#x = 0)
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -744,7 +744,7 @@ SELECT a + b, COUNT(b) FILTER (WHERE b >= 2) FROM testData GROUP BY a + b
-- !query analysis
Aggregate [(a#x + b#x)], [(a#x + b#x) AS (a + b)#x, count(b#x) FILTER (WHERE (b#x >= 2)) AS count(b) FILTER (WHERE (b >= 2))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -770,7 +770,7 @@ SELECT a + 1 + 1, COUNT(b) FILTER (WHERE b > 0) FROM testData GROUP BY a + 1
-- !query analysis
Aggregate [(a#x + 1)], [((a#x + 1) + 1) AS ((a + 1) + 1)#x, count(b#x) FILTER (WHERE (b#x > 0)) AS count(b) FILTER (WHERE (b > 0))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -792,7 +792,7 @@ SELECT a AS k, COUNT(b) FILTER (WHERE b > 0) FROM testData GROUP BY k
-- !query analysis
Aggregate [a#x], [a#x AS k#x, count(b#x) FILTER (WHERE (b#x > 0)) AS count(b) FILTER (WHERE (b > 0))#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -810,7 +810,7 @@ Aggregate [dept_id#x], [dept_id#x, avg(salary#x) AS avg(salary)#x, avg(salary#x)
: +- Project [200 AS 200#x]
: +- OneRowRelation
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -829,13 +829,13 @@ Aggregate [dept_id#x], [dept_id#x, avg(salary#x) AS avg(salary)#x, avg(salary#x)
: +- LocalLimit 1
: +- Project [dept_id#x]
: +- SubqueryAlias dept
-: +- View (`DEPT`, [dept_id#x,dept_name#x,state#x])
+: +- View (`DEPT`, [dept_id#x, dept_name#x, state#x])
: +- Project [cast(dept_id#x as int) AS dept_id#x, cast(dept_name#x as string) AS dept_name#x, cast(state#x as string) AS state#x]
: +- Project [dept_id#x, dept_name#x, state#x]
: +- SubqueryAlias DEPT
: +- LocalRelation [dept_id#x, dept_name#x, state#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -855,13 +855,13 @@ Aggregate [dept_id#x], [dept_id#x, avg(salary#x) AS avg(salary)#x, avg(salary#x)
: +- Project [state#x]
: +- Filter (dept_id#x = outer(dept_id#x))
: +- SubqueryAlias dept
-: +- View (`DEPT`, [dept_id#x,dept_name#x,state#x])
+: +- View (`DEPT`, [dept_id#x, dept_name#x, state#x])
: +- Project [cast(dept_id#x as int) AS dept_id#x, cast(dept_name#x as string) AS dept_name#x, cast(state#x as string) AS state#x]
: +- Project [dept_id#x, dept_name#x, state#x]
: +- SubqueryAlias DEPT
: +- LocalRelation [dept_id#x, dept_name#x, state#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -881,13 +881,13 @@ Aggregate [dept_id#x], [dept_id#x, sum(salary#x) AS sum(salary)#x, sum(salary#x)
: +- Project [state#x]
: +- Filter (dept_id#x = outer(dept_id#x))
: +- SubqueryAlias dept
-: +- View (`DEPT`, [dept_id#x,dept_name#x,state#x])
+: +- View (`DEPT`, [dept_id#x, dept_name#x, state#x])
: +- Project [cast(dept_id#x as int) AS dept_id#x, cast(dept_name#x as string) AS dept_name#x, cast(state#x as string) AS state#x]
: +- Project [dept_id#x, dept_name#x, state#x]
: +- SubqueryAlias DEPT
: +- LocalRelation [dept_id#x, dept_name#x, state#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -906,13 +906,13 @@ Aggregate [dept_id#x], [dept_id#x, avg(salary#x) AS avg(salary)#x, avg(salary#x)
: +- Distinct
: +- Project [dept_id#x]
: +- SubqueryAlias dept
-: +- View (`DEPT`, [dept_id#x,dept_name#x,state#x])
+: +- View (`DEPT`, [dept_id#x, dept_name#x, state#x])
: +- Project [cast(dept_id#x as int) AS dept_id#x, cast(dept_name#x as string) AS dept_name#x, cast(state#x as string) AS state#x]
: +- Project [dept_id#x, dept_name#x, state#x]
: +- SubqueryAlias DEPT
: +- LocalRelation [dept_id#x, dept_name#x, state#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -931,13 +931,13 @@ Aggregate [dept_id#x], [dept_id#x, sum(salary#x) AS sum(salary)#x, sum(salary#x)
: +- Distinct
: +- Project [dept_id#x]
: +- SubqueryAlias dept
-: +- View (`DEPT`, [dept_id#x,dept_name#x,state#x])
+: +- View (`DEPT`, [dept_id#x, dept_name#x, state#x])
: +- Project [cast(dept_id#x as int) AS dept_id#x, cast(dept_name#x as string) AS dept_name#x, cast(state#x as string) AS state#x]
: +- Project [dept_id#x, dept_name#x, state#x]
: +- SubqueryAlias DEPT
: +- LocalRelation [dept_id#x, dept_name#x, state#x]
+- SubqueryAlias emp
- +- View (`EMP`, [id#x,emp_name#x,hiredate#x,salary#x,dept_id#x])
+ +- View (`EMP`, [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x])
+- Project [cast(id#x as int) AS id#x, cast(emp_name#x as string) AS emp_name#x, cast(hiredate#x as date) AS hiredate#x, cast(salary#x as double) AS salary#x, cast(dept_id#x as int) AS dept_id#x]
+- Project [id#x, emp_name#x, hiredate#x, salary#x, dept_id#x]
+- SubqueryAlias EMP
@@ -951,7 +951,7 @@ Project [b#xL]
+- SubqueryAlias t1
+- Aggregate [count(b#x) FILTER (WHERE (a#x >= 2)) AS b#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-ordinal.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-ordinal.sql.out
index 1bcde5bd367f..6aa32ed3a886 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-ordinal.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by-ordinal.sql.out
@@ -27,7 +27,7 @@ select a, sum(b) from data group by 1
-- !query analysis
Aggregate [a#x], [a#x, sum(b#x) AS sum(b)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -39,7 +39,7 @@ select 1, 2, sum(b) from data group by 1, 2
-- !query analysis
Aggregate [1, 2], [1 AS 1#x, 2 AS 2#x, sum(b#x) AS sum(b)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -51,7 +51,7 @@ select a, 1, sum(b) from data group by a, 1
-- !query analysis
Aggregate [a#x, a#x], [a#x, 1 AS 1#x, sum(b#x) AS sum(b)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -63,7 +63,7 @@ select a, 1, sum(b) from data group by 1, 2
-- !query analysis
Aggregate [a#x, 2], [a#x, 1 AS 1#x, sum(b#x) AS sum(b)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -75,7 +75,7 @@ select a, b + 2, count(2) from data group by a, 2
-- !query analysis
Aggregate [a#x, (b#x + 2)], [a#x, (b#x + 2) AS (b + 2)#x, count(2) AS count(2)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -87,7 +87,7 @@ select a as aa, b + 2 as bb, count(2) from data group by 1, 2
-- !query analysis
Aggregate [a#x, (b#x + 2)], [a#x AS aa#x, (b#x + 2) AS bb#x, count(2) AS count(2)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -99,7 +99,7 @@ select sum(b) from data group by 1 + 0
-- !query analysis
Aggregate [(1 + 0)], [sum(b#x) AS sum(b)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -254,7 +254,7 @@ select a, a AS k, count(b) from data group by k, 1
-- !query analysis
Aggregate [a#x, a#x], [a#x, a#x AS k#x, count(b#x) AS count(b)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -268,7 +268,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, b#x, 0], [a#x, b#x, a#x, null, 1], [a#x, b#x, null, b#x, 2], [a#x, b#x, null, null, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -282,7 +282,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, b#x, 0], [a#x, b#x, a#x, null, 1], [a#x, b#x, null, b#x, 2], [a#x, b#x, null, null, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -296,7 +296,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, b#x, 0], [a#x, b#x, a#x, null, 1], [a#x, b#x, null, b#x, 2], [a#x, b#x, null, null, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -310,7 +310,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, b#x, 0], [a#x, b#x, a#x, null, 1], [a#x, b#x, null, null, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -324,7 +324,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, b#x, 0], [a#x, b#x, a#x, null, 1], [a#x, b#x, null, null, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -338,7 +338,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, b#x, 0], [a#x, b#x, a#x, null, 1], [a#x, b#x, null, null, 3]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -352,7 +352,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, null, 1], [a#x, b#x, null, b#x, 2], [a#x, b#x, a#x, b#x, 0]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -366,7 +366,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, null, 1], [a#x, b#x, null, b#x, 2], [a#x, b#x, a#x, b#x, 0]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -380,7 +380,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, count(1) AS count(1)#xL]
+- Expand [[a#x, b#x, a#x, null, 1], [a#x, b#x, null, b#x, 2], [a#x, b#x, a#x, b#x, 0]], [a#x, b#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -482,7 +482,7 @@ select sum(b) from data group by -1
-- !query analysis
Aggregate [-1], [sum(b#x) AS sum(b)#xL]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by.sql.out
index 147a7e9375a5..88517449760d 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/group-by.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/group-by.sql.out
@@ -34,7 +34,7 @@ SELECT COUNT(a), COUNT(b) FROM testData
-- !query analysis
Aggregate [count(a#x) AS count(a)#xL, count(b#x) AS count(b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -46,7 +46,7 @@ SELECT a, COUNT(b) FROM testData GROUP BY a
-- !query analysis
Aggregate [a#x], [a#x, count(b#x) AS count(b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -72,7 +72,7 @@ SELECT COUNT(a), COUNT(b) FROM testData GROUP BY a
-- !query analysis
Aggregate [a#x], [count(a#x) AS count(a)#xL, count(b#x) AS count(b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -84,7 +84,7 @@ SELECT 'foo', COUNT(a) FROM testData GROUP BY 1
-- !query analysis
Aggregate [foo], [foo AS foo#x, count(a#x) AS count(a)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -97,7 +97,7 @@ SELECT 'foo' FROM testData WHERE a = 0 GROUP BY 1
Aggregate [foo], [foo AS foo#x]
+- Filter (a#x = 0)
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -110,7 +110,7 @@ SELECT 'foo', APPROX_COUNT_DISTINCT(a) FROM testData WHERE a = 0 GROUP BY 1
Aggregate [foo], [foo AS foo#x, approx_count_distinct(a#x, 0.05, 0, 0) AS approx_count_distinct(a)#xL]
+- Filter (a#x = 0)
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -123,7 +123,7 @@ SELECT 'foo', MAX(STRUCT(a)) FROM testData WHERE a = 0 GROUP BY 1
Aggregate [foo], [foo AS foo#x, max(struct(a, a#x)) AS max(struct(a))#x]
+- Filter (a#x = 0)
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -135,7 +135,7 @@ SELECT a + b, COUNT(b) FROM testData GROUP BY a + b
-- !query analysis
Aggregate [(a#x + b#x)], [(a#x + b#x) AS (a + b)#x, count(b#x) AS count(b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -161,7 +161,7 @@ SELECT a + 1 + 1, COUNT(b) FROM testData GROUP BY a + 1
-- !query analysis
Aggregate [(a#x + 1)], [((a#x + 1) + 1) AS ((a + 1) + 1)#x, count(b#x) AS count(b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -173,7 +173,7 @@ SELECT count(1) FROM testData GROUP BY struct(a + 0.1 AS aa)
-- !query analysis
Aggregate [struct(aa, (cast(a#x as decimal(10,0)) + 0.1))], [count(1) AS count(1)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -186,7 +186,7 @@ FROM testData
-- !query analysis
Aggregate [skewness(cast(a#x as double)) AS skewness(a)#x, kurtosis(cast(a#x as double)) AS kurtosis(a)#x, min(a#x) AS min(a)#x, max(a#x) AS max(a)#x, avg(a#x) AS avg(a)#x, variance(cast(a#x as double)) AS variance(a)#x, stddev(cast(a#x as double)) AS stddev(a)#x, sum(a#x) AS sum(a)#xL, count(a#x) AS count(a)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -207,7 +207,7 @@ SELECT a AS k, COUNT(b) FROM testData GROUP BY k
-- !query analysis
Aggregate [a#x], [a#x AS k#x, count(b#x) AS count(b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -220,7 +220,7 @@ SELECT a AS k, COUNT(b) FROM testData GROUP BY k HAVING k > 1
Filter (k#x > 1)
+- Aggregate [a#x], [a#x AS k#x, count(b#x) AS count(b)#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -326,7 +326,7 @@ SELECT a, COUNT(1) FROM testData WHERE false GROUP BY a
Aggregate [a#x], [a#x, count(1) AS count(1)#xL]
+- Filter false
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -339,7 +339,7 @@ SELECT COUNT(1) FROM testData WHERE false
Aggregate [count(1) AS count(1)#xL]
+- Filter false
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -354,7 +354,7 @@ Project [1 AS 1#x]
+- Aggregate [count(1) AS count(1)#xL]
+- Filter false
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
@@ -498,7 +498,7 @@ SELECT every(v), some(v), any(v), bool_and(v), bool_or(v) FROM test_agg WHERE 1
Aggregate [every(v#x) AS every(v)#x, some(v#x) AS some(v)#x, any(v#x) AS any(v)#x, bool_and(v#x) AS bool_and(v)#x, bool_or(v#x) AS bool_or(v)#x]
+- Filter (1 = 0)
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -511,7 +511,7 @@ SELECT every(v), some(v), any(v), bool_and(v), bool_or(v) FROM test_agg WHERE k
Aggregate [every(v#x) AS every(v)#x, some(v#x) AS some(v)#x, any(v#x) AS any(v)#x, bool_and(v#x) AS bool_and(v)#x, bool_or(v#x) AS bool_or(v)#x]
+- Filter (k#x = 4)
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -524,7 +524,7 @@ SELECT every(v), some(v), any(v), bool_and(v), bool_or(v) FROM test_agg WHERE k
Aggregate [every(v#x) AS every(v)#x, some(v#x) AS some(v)#x, any(v#x) AS any(v)#x, bool_and(v#x) AS bool_and(v)#x, bool_or(v#x) AS bool_or(v)#x]
+- Filter (k#x = 5)
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -536,7 +536,7 @@ SELECT k, every(v), some(v), any(v), bool_and(v), bool_or(v) FROM test_agg GROUP
-- !query analysis
Aggregate [k#x], [k#x, every(v#x) AS every(v)#x, some(v#x) AS some(v)#x, any(v#x) AS any(v)#x, bool_and(v#x) AS bool_and(v)#x, bool_or(v#x) AS bool_or(v)#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -549,7 +549,7 @@ SELECT k, every(v) FROM test_agg GROUP BY k HAVING every(v) = false
Filter (every(v)#x = false)
+- Aggregate [k#x], [k#x, every(v#x) AS every(v)#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -562,7 +562,7 @@ SELECT k, every(v) FROM test_agg GROUP BY k HAVING every(v) IS NULL
Filter isnull(every(v)#x)
+- Aggregate [k#x], [k#x, every(v#x) AS every(v)#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -584,13 +584,13 @@ Aggregate [k#x], [k#x, every(v#x) AS every#x]
: +- Aggregate [any(v#x) AS any(v)#x]
: +- Filter (k#x = 1)
: +- SubqueryAlias test_agg
- : +- View (`test_agg`, [k#x,v#x])
+ : +- View (`test_agg`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias test_agg
: +- LocalRelation [k#x, v#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -612,13 +612,13 @@ Aggregate [k#x], [k#x, every(v#x) AS every#x]
: +- Aggregate [every(v#x) AS every(v)#x]
: +- Filter (k#x = 1)
: +- SubqueryAlias test_agg
- : +- View (`test_agg`, [k#x,v#x])
+ : +- View (`test_agg`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias test_agg
: +- LocalRelation [k#x, v#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -777,7 +777,7 @@ Project [k#x, v#x, every(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RANG
+- Window [every(v#x) windowspecdefinition(k#x, v#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS every(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [k#x], [v#x ASC NULLS FIRST]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -792,7 +792,7 @@ Project [k#x, v#x, some(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RANGE
+- Window [some(v#x) windowspecdefinition(k#x, v#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS some(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [k#x], [v#x ASC NULLS FIRST]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -807,7 +807,7 @@ Project [k#x, v#x, any(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RANGE
+- Window [any(v#x) windowspecdefinition(k#x, v#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS any(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [k#x], [v#x ASC NULLS FIRST]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -822,7 +822,7 @@ Project [k#x, v#x, bool_and(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST R
+- Window [bool_and(v#x) windowspecdefinition(k#x, v#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS bool_and(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [k#x], [v#x ASC NULLS FIRST]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -837,7 +837,7 @@ Project [k#x, v#x, bool_or(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RA
+- Window [bool_or(v#x) windowspecdefinition(k#x, v#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS bool_or(v) OVER (PARTITION BY k ORDER BY v ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [k#x], [v#x ASC NULLS FIRST]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -850,7 +850,7 @@ SELECT count(*) FROM test_agg HAVING count(*) > 1L
Filter (count(1)#xL > 1)
+- Aggregate [count(1) AS count(1)#xL]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -863,7 +863,7 @@ SELECT k, max(v) FROM test_agg GROUP BY k HAVING max(v) = true
Filter (max(v)#x = true)
+- Aggregate [k#x], [k#x, max(v#x) AS max(v)#x]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -878,7 +878,7 @@ Project [cnt#xL]
+- SubqueryAlias __auto_generated_subquery_name
+- Aggregate [count(1) AS cnt#xL]
+- SubqueryAlias test_agg
- +- View (`test_agg`, [k#x,v#x])
+ +- View (`test_agg`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as boolean) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias test_agg
@@ -963,7 +963,7 @@ GROUP BY a IS NULL
-- !query analysis
Aggregate [isnull(a#x)], [NOT isnull(a#x) AS (NOT (a IS NULL))#x, count(1) AS c#xL]
+- SubqueryAlias testdata
- +- View (`testData`, [a#x,b#x])
+ +- View (`testData`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias testData
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/grouping_set.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/grouping_set.sql.out
index bb453923ce95..b82275b5e312 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/grouping_set.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/grouping_set.sql.out
@@ -23,7 +23,7 @@ Aggregate [a#x, b#x, c#x, spark_grouping_id#xL], [a#x, b#x, c#x, count(d#x) AS c
+- Expand [[a#x, b#x, c#x, d#x, null, null, null, 7]], [a#x, b#x, c#x, d#x, a#x, b#x, c#x, spark_grouping_id#xL]
+- Project [a#x, b#x, c#x, d#x, a#x AS a#x, b#x AS b#x, c#x AS c#x]
+- SubqueryAlias grouping
- +- View (`grouping`, [a#x,b#x,c#x,d#x])
+ +- View (`grouping`, [a#x, b#x, c#x, d#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as string) AS b#x, cast(c#x as string) AS c#x, cast(d#x as int) AS d#x]
+- Project [a#x, b#x, c#x, d#x]
+- SubqueryAlias grouping
@@ -37,7 +37,7 @@ Aggregate [a#x, b#x, c#x, spark_grouping_id#xL], [a#x, b#x, c#x, count(d#x) AS c
+- Expand [[a#x, b#x, c#x, d#x, a#x, null, null, 3]], [a#x, b#x, c#x, d#x, a#x, b#x, c#x, spark_grouping_id#xL]
+- Project [a#x, b#x, c#x, d#x, a#x AS a#x, b#x AS b#x, c#x AS c#x]
+- SubqueryAlias grouping
- +- View (`grouping`, [a#x,b#x,c#x,d#x])
+ +- View (`grouping`, [a#x, b#x, c#x, d#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as string) AS b#x, cast(c#x as string) AS c#x, cast(d#x as int) AS d#x]
+- Project [a#x, b#x, c#x, d#x]
+- SubqueryAlias grouping
@@ -51,7 +51,7 @@ Aggregate [a#x, b#x, c#x, spark_grouping_id#xL], [a#x, b#x, c#x, count(d#x) AS c
+- Expand [[a#x, b#x, c#x, d#x, null, null, c#x, 6]], [a#x, b#x, c#x, d#x, a#x, b#x, c#x, spark_grouping_id#xL]
+- Project [a#x, b#x, c#x, d#x, a#x AS a#x, b#x AS b#x, c#x AS c#x]
+- SubqueryAlias grouping
- +- View (`grouping`, [a#x,b#x,c#x,d#x])
+ +- View (`grouping`, [a#x, b#x, c#x, d#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as string) AS b#x, cast(c#x as string) AS c#x, cast(d#x as int) AS d#x]
+- Project [a#x, b#x, c#x, d#x]
+- SubqueryAlias grouping
@@ -251,7 +251,7 @@ Aggregate [a#x, b#x, c#x, spark_grouping_id#xL], [CASE WHEN isnull(a#x) THEN cou
+- Expand [[a#x, b#x, c#x, d#x, a#x, null, null, 3], [a#x, b#x, c#x, d#x, null, b#x, null, 5], [a#x, b#x, c#x, d#x, null, null, c#x, 6]], [a#x, b#x, c#x, d#x, a#x, b#x, c#x, spark_grouping_id#xL]
+- Project [a#x, b#x, c#x, d#x, a#x AS a#x, b#x AS b#x, c#x AS c#x]
+- SubqueryAlias grouping
- +- View (`grouping`, [a#x,b#x,c#x,d#x])
+ +- View (`grouping`, [a#x, b#x, c#x, d#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as string) AS b#x, cast(c#x as string) AS c#x, cast(d#x as int) AS d#x]
+- Project [a#x, b#x, c#x, d#x]
+- SubqueryAlias grouping
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/having.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/having.sql.out
index d96ea1e43e18..889ca3d244cc 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/having.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/having.sql.out
@@ -24,7 +24,7 @@ SELECT k, sum(v) FROM hav GROUP BY k HAVING sum(v) > 2
Filter (sum(v)#xL > cast(2 as bigint))
+- Aggregate [k#x], [k#x, sum(v#x) AS sum(v)#xL]
+- SubqueryAlias hav
- +- View (`hav`, [k#x,v#x])
+ +- View (`hav`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias hav
@@ -38,7 +38,7 @@ Project [count(k)#xL]
+- Filter ((v#x + 1)#x = 2)
+- Aggregate [(v#x + 1)], [count(k#x) AS count(k)#xL, (v#x + 1) AS (v#x + 1)#x]
+- SubqueryAlias hav
- +- View (`hav`, [k#x,v#x])
+ +- View (`hav`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias hav
@@ -77,7 +77,7 @@ Project [min(v)#x]
+- Project [k#x, v#x]
+- Filter (v#x > 0)
+- SubqueryAlias hav
- +- View (`hav`, [k#x,v#x])
+ +- View (`hav`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias hav
@@ -188,7 +188,7 @@ Sort [sum(v)#xL ASC NULLS FIRST], true
+- Filter (sum(v)#xL > cast(2 as bigint))
+- Aggregate [k#x], [k#x, sum(v#x) AS sum(v)#xL]
+- SubqueryAlias hav
- +- View (`hav`, [k#x,v#x])
+ +- View (`hav`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias hav
@@ -203,7 +203,7 @@ Project [k#x, sum(v)#xL]
+- Filter (sum(v)#xL > cast(2 as bigint))
+- Aggregate [k#x], [k#x, sum(v#x) AS sum(v)#xL, avg(v#x) AS avg(v#x)#x]
+- SubqueryAlias hav
- +- View (`hav`, [k#x,v#x])
+ +- View (`hav`, [k#x, v#x])
+- Project [cast(k#x as string) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias hav
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/higher-order-functions.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/higher-order-functions.sql.out
index b66c87016208..ec6d7271cc23 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/higher-order-functions.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/higher-order-functions.sql.out
@@ -40,7 +40,7 @@ select transform(zs, z -> z) as v from nested
-- !query analysis
Project [transform(zs#x, lambdafunction(lambda z#x, lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -51,7 +51,7 @@ select transform(ys, y -> y * y) as v from nested
-- !query analysis
Project [transform(ys#x, lambdafunction((lambda y#x * lambda y#x), lambda y#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -62,7 +62,7 @@ select transform(ys, (y, i) -> y + i) as v from nested
-- !query analysis
Project [transform(ys#x, lambdafunction((lambda y#x + lambda i#x), lambda y#x, lambda i#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -73,7 +73,7 @@ select transform(zs, z -> concat(ys, z)) as v from nested
-- !query analysis
Project [transform(zs#x, lambdafunction(concat(ys#x, lambda z#x), lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -84,7 +84,7 @@ select transform(ys, 0) as v from nested
-- !query analysis
Project [transform(ys#x, lambdafunction(0, lambda col0#x, true)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -102,7 +102,7 @@ select filter(ys, y -> y > 30) as v from nested
-- !query analysis
Project [filter(ys#x, lambdafunction((lambda y#x > 30), lambda y#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -120,7 +120,7 @@ select transform(zs, z -> filter(z, zz -> zz > 50)) as v from nested
-- !query analysis
Project [transform(zs#x, lambdafunction(filter(lambda z#x, lambdafunction((lambda zz#x > 50), lambda zz#x, false)), lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -131,7 +131,7 @@ select aggregate(ys, 0, (y, a) -> y + a + x) as v from nested
-- !query analysis
Project [aggregate(ys#x, 0, lambdafunction(((lambda y#x + lambda a#x) + x#x), lambda y#x, lambda a#x, false), lambdafunction(lambda id#x, lambda id#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -142,7 +142,7 @@ select aggregate(ys, (0 as sum, 0 as n), (acc, x) -> (acc.sum + x, acc.n + 1), a
-- !query analysis
Project [aggregate(ys#x, named_struct(sum, 0, n, 0), lambdafunction(named_struct(col1, (lambda acc#x.sum + lambda x#x), col2, (lambda acc#x.n + 1)), lambda acc#x, lambda x#x, false), lambdafunction((cast(lambda acc#x.sum as double) / cast(lambda acc#x.n as double)), lambda acc#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -153,7 +153,7 @@ select transform(zs, z -> aggregate(z, 1, (acc, val) -> acc * val * size(z))) as
-- !query analysis
Project [transform(zs#x, lambdafunction(aggregate(lambda z#x, 1, lambdafunction(((lambda acc#x * lambda val#x) * size(lambda z#x, true)), lambda acc#x, lambda val#x, false), lambdafunction(lambda id#x, lambda id#x, false)), lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -171,7 +171,7 @@ select reduce(ys, 0, (y, a) -> y + a + x) as v from nested
-- !query analysis
Project [reduce(ys#x, 0, lambdafunction(((lambda y#x + lambda a#x) + x#x), lambda y#x, lambda a#x, false), lambdafunction(lambda id#x, lambda id#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -182,7 +182,7 @@ select reduce(ys, (0 as sum, 0 as n), (acc, x) -> (acc.sum + x, acc.n + 1), acc
-- !query analysis
Project [reduce(ys#x, named_struct(sum, 0, n, 0), lambdafunction(named_struct(col1, (lambda acc#x.sum + lambda x#x), col2, (lambda acc#x.n + 1)), lambda acc#x, lambda x#x, false), lambdafunction((cast(lambda acc#x.sum as double) / cast(lambda acc#x.n as double)), lambda acc#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -193,7 +193,7 @@ select transform(zs, z -> reduce(z, 1, (acc, val) -> acc * val * size(z))) as v
-- !query analysis
Project [transform(zs#x, lambdafunction(reduce(lambda z#x, 1, lambdafunction(((lambda acc#x * lambda val#x) * size(lambda z#x, true)), lambda acc#x, lambda val#x, false), lambdafunction(lambda id#x, lambda id#x, false)), lambda z#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -211,7 +211,7 @@ select exists(ys, y -> y > 30) as v from nested
-- !query analysis
Project [exists(ys#x, lambdafunction((lambda y#x > 30), lambda y#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -229,7 +229,7 @@ select zip_with(ys, zs, (a, b) -> a + size(b)) as v from nested
-- !query analysis
Project [zip_with(ys#x, zs#x, lambdafunction((lambda a#x + size(lambda b#x, true)), lambda a#x, lambda b#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x,zs#x])
+ +- View (`nested`, [x#x, ys#x, zs#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as array<int>) AS ys#x, cast(zs#x as array<array<int>>) AS zs#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x, zs#x]
@@ -268,7 +268,7 @@ select transform_keys(ys, (k, v) -> k) as v from nested
-- !query analysis
Project [transform_keys(ys#x, lambdafunction(lambda k#x, lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -279,7 +279,7 @@ select transform_keys(ys, (k, v) -> k + 1) as v from nested
-- !query analysis
Project [transform_keys(ys#x, lambdafunction((lambda k#x + 1), lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -290,7 +290,7 @@ select transform_keys(ys, (k, v) -> k + v) as v from nested
-- !query analysis
Project [transform_keys(ys#x, lambdafunction((lambda k#x + lambda v#x), lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -301,7 +301,7 @@ select transform_values(ys, (k, v) -> v) as v from nested
-- !query analysis
Project [transform_values(ys#x, lambdafunction(lambda v#x, lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -312,7 +312,7 @@ select transform_values(ys, (k, v) -> v + 1) as v from nested
-- !query analysis
Project [transform_values(ys#x, lambdafunction((lambda v#x + 1), lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
@@ -323,7 +323,7 @@ select transform_values(ys, (k, v) -> k + v) as v from nested
-- !query analysis
Project [transform_values(ys#x, lambdafunction((lambda k#x + lambda v#x), lambda k#x, lambda v#x, false)) AS v#x]
+- SubqueryAlias nested
- +- View (`nested`, [x#x,ys#x])
+ +- View (`nested`, [x#x, ys#x])
+- Project [cast(x#x as int) AS x#x, cast(ys#x as map<int,int>) AS ys#x]
+- SubqueryAlias t
+- LocalRelation [x#x, ys#x]
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/ilike-all.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/ilike-all.sql.out
index aeb9fcdcb989..dc36fc2be1a2 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/ilike-all.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/ilike-all.sql.out
@@ -23,7 +23,7 @@ SELECT company FROM ilike_all_table WHERE company ILIKE ALL ('%oO%', '%Go%')
Project [company#x]
+- Filter likeall(lower(company#x), %oo%, %go%)
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -37,7 +37,7 @@ SELECT company FROM ilike_all_table WHERE company ILIKE ALL ('microsoft', '%yoo%
Project [company#x]
+- Filter likeall(lower(company#x), microsoft, %yoo%)
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -60,7 +60,7 @@ FROM ilike_all_table
-- !query analysis
Project [company#x, CASE WHEN likeall(lower(company#x), %oo%, %go%) THEN Y ELSE N END AS is_available#x, CASE WHEN (likeall(lower(company#x), %oo%, go%) OR likeall(lower(company#x), %in, ms%)) THEN Y ELSE N END AS mix#x]
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -74,7 +74,7 @@ SELECT company FROM ilike_all_table WHERE company ILIKE ALL ('%oo%', pat)
Project [company#x]
+- Filter (ilike(company#x, %oo%, \) AND ilike(company#x, pat#x, \))
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -88,7 +88,7 @@ SELECT company FROM ilike_all_table WHERE company NOT ILIKE ALL ('%oo%', '%In',
Project [company#x]
+- Filter notlikeall(lower(company#x), %oo%, %in, fa%)
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -102,7 +102,7 @@ SELECT company FROM ilike_all_table WHERE company NOT ILIKE ALL ('microsoft', '%
Project [company#x]
+- Filter notlikeall(lower(company#x), microsoft, %yoo%)
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -116,7 +116,7 @@ SELECT company FROM ilike_all_table WHERE company NOT ILIKE ALL ('%oo%', 'fA%')
Project [company#x]
+- Filter notlikeall(lower(company#x), %oo%, fa%)
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -130,7 +130,7 @@ SELECT company FROM ilike_all_table WHERE NOT company ILIKE ALL ('%oO%', 'fa%')
Project [company#x]
+- Filter NOT likeall(lower(company#x), %oo%, fa%)
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -144,7 +144,7 @@ SELECT company FROM ilike_all_table WHERE company ILIKE ALL ('%OO%', NULL)
Project [company#x]
+- Filter (ilike(company#x, %OO%, \) AND ilike(company#x, cast(null as string), \))
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -158,7 +158,7 @@ SELECT company FROM ilike_all_table WHERE company NOT ILIKE ALL ('%Oo%', NULL)
Project [company#x]
+- Filter (NOT ilike(company#x, %Oo%, \) AND NOT ilike(company#x, cast(null as string), \))
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -172,7 +172,7 @@ SELECT company FROM ilike_all_table WHERE company ILIKE ALL (NULL, NULL)
Project [company#x]
+- Filter (ilike(company#x, cast(null as string), \) AND ilike(company#x, cast(null as string), \))
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -186,7 +186,7 @@ SELECT company FROM ilike_all_table WHERE company NOT ILIKE ALL (NULL, NULL)
Project [company#x]
+- Filter (NOT ilike(company#x, cast(null as string), \) AND NOT ilike(company#x, cast(null as string), \))
+- SubqueryAlias ilike_all_table
- +- View (`ilike_all_table`, [company#x,pat#x])
+ +- View (`ilike_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/ilike-any.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/ilike-any.sql.out
index 1d9d06243f97..ac25d786cda5 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/ilike-any.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/ilike-any.sql.out
@@ -23,7 +23,7 @@ SELECT company FROM ilike_any_table WHERE company ILIKE ANY ('%oo%', '%IN', 'fA%
Project [company#x]
+- Filter likeany(lower(company#x), %oo%, %in, fa%)
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -37,7 +37,7 @@ SELECT company FROM ilike_any_table WHERE company ILIKE ANY ('microsoft', '%yoo%
Project [company#x]
+- Filter likeany(lower(company#x), microsoft, %yoo%)
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -60,7 +60,7 @@ FROM ilike_any_table
-- !query analysis
Project [company#x, CASE WHEN likeany(lower(company#x), %oo%, %in, fa%) THEN Y ELSE N END AS is_available#x, CASE WHEN (likeany(lower(company#x), %oo%, fa%) OR likeany(lower(company#x), %in, ms%)) THEN Y ELSE N END AS mix#x]
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -74,7 +74,7 @@ SELECT company FROM ilike_any_table WHERE company ILIKE ANY ('%zZ%', pat)
Project [company#x]
+- Filter (ilike(company#x, %zZ%, \) OR ilike(company#x, pat#x, \))
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -88,7 +88,7 @@ SELECT company FROM ilike_any_table WHERE company NOT ILIKE ANY ('%oO%', '%iN',
Project [company#x]
+- Filter notlikeany(lower(company#x), %oo%, %in, fa%)
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -102,7 +102,7 @@ SELECT company FROM ilike_any_table WHERE company NOT ILIKE ANY ('microsoft', '%
Project [company#x]
+- Filter notlikeany(lower(company#x), microsoft, %yoo%)
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -116,7 +116,7 @@ SELECT company FROM ilike_any_table WHERE company NOT ILIKE ANY ('%oo%', 'Fa%')
Project [company#x]
+- Filter notlikeany(lower(company#x), %oo%, fa%)
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -130,7 +130,7 @@ SELECT company FROM ilike_any_table WHERE NOT company ILIKE ANY ('%OO%', 'fa%')
Project [company#x]
+- Filter NOT likeany(lower(company#x), %oo%, fa%)
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -144,7 +144,7 @@ SELECT company FROM ilike_any_table WHERE company ILIKE ANY ('%oO%', NULL)
Project [company#x]
+- Filter (ilike(company#x, %oO%, \) OR ilike(company#x, cast(null as string), \))
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -158,7 +158,7 @@ SELECT company FROM ilike_any_table WHERE company NOT ILIKE ANY ('%oo%', NULL)
Project [company#x]
+- Filter (NOT ilike(company#x, %oo%, \) OR NOT ilike(company#x, cast(null as string), \))
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -172,7 +172,7 @@ SELECT company FROM ilike_any_table WHERE company ILIKE ANY (NULL, NULL)
Project [company#x]
+- Filter (ilike(company#x, cast(null as string), \) OR ilike(company#x, cast(null as string), \))
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -186,7 +186,7 @@ SELECT company FROM ilike_any_table WHERE company NOT ILIKE ANY (NULL, NULL)
Project [company#x]
+- Filter (NOT ilike(company#x, cast(null as string), \) OR NOT ilike(company#x, cast(null as string), \))
+- SubqueryAlias ilike_any_table
- +- View (`ilike_any_table`, [company#x,pat#x])
+ +- View (`ilike_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/inner-join.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/inner-join.sql.out
index 375f889b58f0..698b1056f73e 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/inner-join.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/inner-join.sql.out
@@ -93,7 +93,7 @@ SELECT tb.* FROM ta INNER JOIN tb ON ta.a = tb.a AND ta.tag = tb.tag
Project [a#x, tag#x]
+- Join Inner, ((a#x = a#x) AND (tag#x = tag#x))
:- SubqueryAlias ta
- : +- View (`ta`, [a#x,tag#x])
+ : +- View (`ta`, [a#x, tag#x])
: +- Project [cast(a#x as int) AS a#x, cast(tag#x as string) AS tag#x]
: +- Union false, false
: :- Project [a#x, a AS tag#x]
@@ -111,7 +111,7 @@ Project [a#x, tag#x]
: +- SubqueryAlias GROUPING
: +- LocalRelation [a#x]
+- SubqueryAlias tb
- +- View (`tb`, [a#x,tag#x])
+ +- View (`tb`, [a#x, tag#x])
+- Project [cast(a#x as int) AS a#x, cast(tag#x as string) AS tag#x]
+- Union false, false
:- Project [a#x, a AS tag#x]
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/intersect-all.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/intersect-all.sql.out
index 2535544343d2..b4d791c2772b 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/intersect-all.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/intersect-all.sql.out
@@ -55,14 +55,14 @@ SELECT * FROM tab2
Intersect All true
:- Project [k#x, v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -77,7 +77,7 @@ SELECT * FROM tab1 WHERE k = 1
Intersect All true
:- Project [k#x, v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
@@ -85,7 +85,7 @@ Intersect All true
+- Project [k#x, v#x]
+- Filter (k#x = 1)
+- SubqueryAlias tab1
- +- View (`tab1`, [k#x,v#x])
+ +- View (`tab1`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab1
@@ -101,14 +101,14 @@ Intersect All true
:- Project [k#x, v#x]
: +- Filter (k#x > 2)
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -123,7 +123,7 @@ SELECT * FROM tab2 WHERE k > 3
Intersect All true
:- Project [k#x, v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
@@ -131,7 +131,7 @@ Intersect All true
+- Project [k#x, v#x]
+- Filter (k#x > 3)
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -147,7 +147,7 @@ Intersect All true
:- Project [cast(k#x as bigint) AS k#xL, cast(v#x as bigint) AS v#xL]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
@@ -219,21 +219,21 @@ Intersect All true
:- Intersect All true
: :- Project [k#x, v#x]
: : +- SubqueryAlias tab2
-: : +- View (`tab2`, [k#x,v#x])
+: : +- View (`tab2`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab2
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -253,14 +253,14 @@ Union false, false
:- Except false
: :- Project [k#x, v#x]
: : +- SubqueryAlias tab1
-: : +- View (`tab1`, [k#x,v#x])
+: : +- View (`tab1`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab1
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab2
-: +- View (`tab2`, [k#x,v#x])
+: +- View (`tab2`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab2
@@ -268,14 +268,14 @@ Union false, false
+- Intersect All true
:- Project [k#x, v#x]
: +- SubqueryAlias tab1
- : +- View (`tab1`, [k#x,v#x])
+ : +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -295,14 +295,14 @@ Except false
:- Except false
: :- Project [k#x, v#x]
: : +- SubqueryAlias tab1
-: : +- View (`tab1`, [k#x,v#x])
+: : +- View (`tab1`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab1
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab2
-: +- View (`tab2`, [k#x,v#x])
+: +- View (`tab2`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab2
@@ -310,14 +310,14 @@ Except false
+- Intersect All true
:- Project [k#x, v#x]
: +- SubqueryAlias tab1
- : +- View (`tab1`, [k#x,v#x])
+ : +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -344,28 +344,28 @@ Intersect All true
: :- Except false
: : :- Project [k#x, v#x]
: : : +- SubqueryAlias tab1
-: : : +- View (`tab1`, [k#x,v#x])
+: : : +- View (`tab1`, [k#x, v#x])
: : : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : : +- Project [k#x, v#x]
: : : +- SubqueryAlias tab1
: : : +- LocalRelation [k#x, v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab2
-: : +- View (`tab2`, [k#x,v#x])
+: : +- View (`tab2`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab2
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -393,13 +393,13 @@ Intersect All true
: +- Project [k#x, v#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias tab1
-: : +- View (`tab1`, [k#x,v#x])
+: : +- View (`tab1`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab1
: : +- LocalRelation [k#x, v#x]
: +- SubqueryAlias tab2
-: +- View (`tab2`, [k#x,v#x])
+: +- View (`tab2`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab2
@@ -409,13 +409,13 @@ Intersect All true
+- Project [k#x, v#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias tab1
- : +- View (`tab1`, [k#x,v#x])
+ : +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -443,13 +443,13 @@ Intersect All true
: +- Project [k#x, v#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias tab1
-: : +- View (`tab1`, [k#x,v#x])
+: : +- View (`tab1`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab1
: : +- LocalRelation [k#x, v#x]
: +- SubqueryAlias tab2
-: +- View (`tab2`, [k#x,v#x])
+: +- View (`tab2`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab2
@@ -459,13 +459,13 @@ Intersect All true
+- Project [v#x AS k#x, k#x AS v#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias tab1
- : +- View (`tab1`, [k#x,v#x])
+ : +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -480,14 +480,14 @@ SELECT k FROM tab2 GROUP BY k
Intersect All true
:- Aggregate [v#x], [v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Aggregate [k#x], [k#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -514,28 +514,28 @@ Intersect All true
: :- Except false
: : :- Project [k#x, v#x]
: : : +- SubqueryAlias tab1
-: : : +- View (`tab1`, [k#x,v#x])
+: : : +- View (`tab1`, [k#x, v#x])
: : : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : : +- Project [k#x, v#x]
: : : +- SubqueryAlias tab1
: : : +- LocalRelation [k#x, v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab2
-: : +- View (`tab2`, [k#x,v#x])
+: : +- View (`tab2`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab2
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
@@ -556,28 +556,28 @@ Intersect false
: :- Except false
: : :- Project [k#x, v#x]
: : : +- SubqueryAlias tab1
-: : : +- View (`tab1`, [k#x,v#x])
+: : : +- View (`tab1`, [k#x, v#x])
: : : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : : +- Project [k#x, v#x]
: : : +- SubqueryAlias tab1
: : : +- LocalRelation [k#x, v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab2
-: : +- View (`tab2`, [k#x,v#x])
+: : +- View (`tab2`, [k#x, v#x])
: : +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: : +- Project [k#x, v#x]
: : +- SubqueryAlias tab2
: : +- LocalRelation [k#x, v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
-: +- View (`tab1`, [k#x,v#x])
+: +- View (`tab1`, [k#x, v#x])
: +- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
: +- Project [k#x, v#x]
: +- SubqueryAlias tab1
: +- LocalRelation [k#x, v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
- +- View (`tab2`, [k#x,v#x])
+ +- View (`tab2`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias tab2
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/join-lateral.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/join-lateral.sql.out
index faa582035ef3..a7bc1de1530a 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/join-lateral.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/join-lateral.sql.out
@@ -36,7 +36,7 @@ Project [c1#x, c2#x, c1#x]
: +- Project [outer(c1#x) AS c1#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -49,11 +49,11 @@ Project [c1#x, c2#x, c1#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [c1#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -66,11 +66,11 @@ Project [c1#x, c2#x, c1#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [outer(c1#x) AS c1#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -83,11 +83,11 @@ Project [c1#x, c2#x, (outer(spark_catalog.default.t1.c1) + c1)#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [(outer(c1#x) + c1#x) AS (outer(spark_catalog.default.t1.c1) + c1)#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -101,7 +101,7 @@ Project [c1#x, c2#x]
: +- Project
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -114,11 +114,11 @@ Project [c1#x, c2#x, c1#x, c2#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [c1#x, c2#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -132,7 +132,7 @@ Project [c1#x, c2#x, c1#x, c2#x]
: +- Project [outer(c1#x) AS c1#x, outer(c2#x) AS c2#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -145,11 +145,11 @@ Project [c1#x, c2#x, c1#x, c2#x, c1#x, c2#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [outer(c1#x) AS c1#x, outer(c2#x) AS c2#x, c1#x, c2#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -163,11 +163,11 @@ Project [c1#x, c2#x, c1#x, c2#x]
: +- Project [c1#x, c2#x]
: +- SubqueryAlias t1
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -202,7 +202,7 @@ Project [c1#x, c2#x, c3#x]
: +- Project [(outer(c1#x) + outer(c2#x)) AS c3#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -216,7 +216,7 @@ Project [c1#x, c2#x, c3#x]
: +- Project [(outer(c1#x) + outer(c2#x)) AS c3#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -230,7 +230,7 @@ Project [c1#x, c2#x, c3#x]
: +- Project [(outer(c1#x) + outer(c2#x)) AS c3#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -280,7 +280,7 @@ Project [c1#x, c2#x]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [c1#x, c2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -293,11 +293,11 @@ Project [c1#x, c2#x, c1#x, c2#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [c1#x, c2#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -310,13 +310,13 @@ Project [c1#x, c2#x, c1#x, c2#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [c1#x, c2#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [c1#x, c2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -329,13 +329,13 @@ Project [c1#x, c2#x, c1#x, c2#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [c1#x, c2#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [c1#x, c2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -350,7 +350,7 @@ Project [a#x, b#x]
: +- Project [outer(c1#x), outer(c2#x)]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -377,11 +377,11 @@ Project [c1#x, c2#x, c2#x]
: +- Project [c2#x]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -395,11 +395,11 @@ Project [c1#x, c2#x, c2#x]
: +- Project [c2#x]
: +- Filter (outer(c2#x) < c2#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -413,11 +413,11 @@ Project [c1#x, c2#x, m#x]
: +- Aggregate [max(c2#x) AS m#x]
: +- Filter (outer(c2#x) < c2#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -432,11 +432,11 @@ Project [c1#x, c2#x, c1#x, c2#x, (outer(spark_catalog.default.t1.c2) + outer(spa
: +- OneRowRelation
+- Join Inner
:- SubqueryAlias spark_catalog.default.t1
- : +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t2
- +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -481,7 +481,7 @@ org.apache.spark.sql.catalyst.ExtendedAnalysisException
"errorClass" : "UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY.NON_DETERMINISTIC_LATERAL_SUBQUERIES",
"sqlState" : "0A000",
"messageParameters" : {
- "treeNode" : "LateralJoin lateral-subquery#x [c1#x && c2#x], Inner\n: +- SubqueryAlias __auto_generated_subquery_name\n: +- Project [(cast((outer(c1#x) + outer(c2#x)) as double) + rand(number)) AS c3#x]\n: +- OneRowRelation\n+- SubqueryAlias spark_catalog.default.t1\n +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])\n +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]\n +- LocalRelation [col1#x, col2#x]\n"
+ "treeNode" : "LateralJoin lateral-subquery#x [c1#x && c2#x], Inner\n: +- SubqueryAlias __auto_generated_subquery_name\n: +- Project [(cast((outer(c1#x) + outer(c2#x)) as double) + rand(number)) AS c3#x]\n: +- OneRowRelation\n+- SubqueryAlias spark_catalog.default.t1\n +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])\n +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]\n +- LocalRelation [col1#x, col2#x]\n"
},
"queryContext" : [ {
"objectType" : "",
@@ -501,7 +501,7 @@ org.apache.spark.sql.catalyst.ExtendedAnalysisException
"errorClass" : "UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY.NON_DETERMINISTIC_LATERAL_SUBQUERIES",
"sqlState" : "0A000",
"messageParameters" : {
- "treeNode" : "LateralJoin lateral-subquery#x [], Inner\n: +- SubqueryAlias __auto_generated_subquery_name\n: +- Project [rand(number) AS rand(number)#x]\n: +- SubqueryAlias spark_catalog.default.t2\n: +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])\n: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]\n: +- LocalRelation [col1#x, col2#x]\n+- SubqueryAlias spark_catalog.default.t1\n +- View (`spark_catalog`. [...]
+ "treeNode" : "LateralJoin lateral-subquery#x [], Inner\n: +- SubqueryAlias __auto_generated_subquery_name\n: +- Project [rand(number) AS rand(number)#x]\n: +- SubqueryAlias spark_catalog.default.t2\n: +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])\n: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]\n: +- LocalRelation [col1#x, col2#x]\n+- SubqueryAlias spark_catalog.default.t1\n +- View (`spark_catalog` [...]
},
"queryContext" : [ {
"objectType" : "",
@@ -553,7 +553,7 @@ Project [c1#x, c2#x, a#x, b#x, c#x]
: +- Project [(outer(c1#x) + outer(c2#x)) AS a#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -570,16 +570,16 @@ Project [c1#x, c2#x, c2#x, c1#x, c2#x]
: : +- Project [c2#x]
: : +- Filter (outer(c1#x) = c1#x)
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias spark_catalog.default.t1
- : +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias t3
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -596,11 +596,11 @@ Project [c1#x, c2#x, c1#x, c2#x, c1#x]
: : +- Project [outer(c1#x) AS c1#x]
: : +- OneRowRelation
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -620,7 +620,7 @@ Project [c1#x, c2#x, c1#x, c1#x]
: +- Project [(outer(c1#x) + 1) AS c1#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -644,11 +644,11 @@ Project [c1#x, c2#x, c1#x, m#x, m#x]
: +- Aggregate [c1#x], [c1#x, min(c2#x) AS m#x]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -702,12 +702,12 @@ Project [c1#x, c2#x, c2#x, scalarsubquery()#x]
: +- Project [outer(c2#x) AS c2#x, scalar-subquery#x [] AS scalarsubquery()#x]
: : +- Aggregate [min(c2#x) AS min(c2)#x]
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -722,14 +722,14 @@ Project [c1#x, c2#x, scalarsubquery(a)#xL]
: : +- Aggregate [sum(c2#x) AS sum(c2)#xL]
: : +- Filter (c1#x = outer(a#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias __auto_generated_subquery_name
: +- Project [outer(c1#x) AS a#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -766,11 +766,11 @@ Project [c1#x, c2#x]
: : +- Project [outer(c1#x) AS a#x]
: : +- OneRowRelation
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -787,11 +787,11 @@ Project [c1#x, c2#x]
: : +- Project [outer(c1#x) AS a#x]
: : +- OneRowRelation
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -805,15 +805,15 @@ Project [c1#x, c2#x, c1#x, c2#x, c1#x, c2#x]
: +- Project [c1#x, c2#x, c1#x, c2#x]
: +- Join Inner, ((c1#x = c1#x) AND (c1#x = outer(c1#x)))
: :- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -827,15 +827,15 @@ Project [c1#x, c2#x, c1#x, c2#x, c1#x, c2#x]
: +- Project [c1#x, c2#x, c1#x, c2#x]
: +- Join Inner, (NOT (c1#x = c1#x) AND NOT (c1#x = outer(c1#x)))
: :- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -849,15 +849,15 @@ Project [c1#x, c2#x, c1#x, c2#x, c1#x, c2#x]
: +- Project [c1#x, c2#x, c1#x, c2#x]
: +- Join LeftOuter, ((c1#x = c1#x) AND (c1#x = outer(c1#x)))
: :- SubqueryAlias spark_catalog.default.t4
- : : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -871,11 +871,11 @@ Project [c1#x, c2#x, cnt#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -889,11 +889,11 @@ Project [c1#x, c2#x, cnt#xL, sum#xL]
: +- Aggregate [count(1) AS cnt#xL, sum(c2#x) AS sum#xL]
: +- Filter (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -907,11 +907,11 @@ Project [c1#x, c2#x, (sum(c2) IS NULL)#x]
: +- Aggregate [isnull(sum(c2#x)) AS (sum(c2) IS NULL)#x]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -925,11 +925,11 @@ Project [c1#x, c2#x, (count(1) + CASE WHEN (sum(c2) IS NULL) THEN 0 ELSE sum(c2)
: +- Aggregate [(count(1) + CASE WHEN isnull(sum(c2#x)) THEN cast(0 as bigint) ELSE sum(c2#x) END) AS (count(1) + CASE WHEN (sum(c2) IS NULL) THEN 0 ELSE sum(c2) END)#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -943,11 +943,11 @@ Project [c1#x, c2#x, c1#x, cnt#xL]
: +- Aggregate [c1#x], [c1#x, count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -961,11 +961,11 @@ Project [c1#x, c2#x, c2#x, cnt#xL]
: +- Aggregate [c2#x], [c2#x, count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -979,11 +979,11 @@ Project [c1#x, c2#x, cnt#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -997,11 +997,11 @@ Project [c1#x, c2#x, cnt#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1015,11 +1015,11 @@ Project [c1#x, c2#x, cnt#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1033,11 +1033,11 @@ Project [c1#x, c2#x, c1#x, cnt#xL]
: +- Aggregate [c1#x], [c1#x, count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1051,11 +1051,11 @@ Project [c1#x, c2#x, c1#x, cnt#xL]
: +- Aggregate [c1#x], [c1#x, count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1069,11 +1069,11 @@ Project [c1#x, c2#x, cnt#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1088,11 +1088,11 @@ Project [c1#x, c2#x, cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias t2
: +- SubqueryAlias spark_catalog.default.t1
- : +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1108,11 +1108,11 @@ Project [c1#x, c2#x, cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias t2
: +- SubqueryAlias spark_catalog.default.t1
- : +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1128,11 +1128,11 @@ Project [c1#x, c2#x, sum(cnt)#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1148,11 +1148,11 @@ Project [c1#x, c2#x, count(cnt)#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1168,11 +1168,11 @@ Project [c1#x, c2#x, sum(cnt)#xL]
: +- Aggregate [c1#x], [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1192,15 +1192,15 @@ Project [c1#x, c2#x, count(1)#xL]
: : +- Aggregate [count(1) AS cnt#xL]
: : +- Filter (outer(c1#x) = c1#x)
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1217,11 +1217,11 @@ Project [c1#x, c2#x, cnt#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1238,11 +1238,11 @@ Project [c1#x, c2#x, count(1)#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1262,11 +1262,11 @@ Project [c1#x, c2#x, count(1)#xL]
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1286,15 +1286,15 @@ Project [c1#x, c2#x, cnt#xL, c1#x, c2#x]
: : +- Aggregate [count(1) AS cnt#xL]
: : +- Filter (outer(c1#x) = c1#x)
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1315,18 +1315,18 @@ Project [c1#x, c2#x, (cnt + cnt)#xL]
: : +- Aggregate [count(1) AS cnt#xL]
: : +- Filter (outer(c1#x) = c1#x)
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias r
: +- Aggregate [count(1) AS cnt#xL]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1340,11 +1340,11 @@ Project [c1#x, c2#x, min(c2)#x]
: +- Aggregate [c1#x], [min(c2#x) AS min(c2)#x]
: +- Filter (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1362,7 +1362,7 @@ WithCTE
: +- SubqueryAlias cte1
: +- Project [c1#x]
: +- SubqueryAlias spark_catalog.default.t1
-: +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+: +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
:- CTERelationDef xxxx, false
@@ -1373,7 +1373,7 @@ WithCTE
: : +- Project [c1#x, c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
-: : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+: : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias cte1
@@ -1393,7 +1393,7 @@ Project [c1#x, c2#x, col#x]
: +- Generate explode(outer(c2#x)), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1408,7 +1408,7 @@ Project [c1#x, c2#x, col#x]
: +- Generate explode(outer(c2#x)), true, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1424,7 +1424,7 @@ Project [c1#x, c2#x, c3#x]
: +- Generate explode(outer(c2#x)), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1440,7 +1440,7 @@ Project [c1#x, c2#x, c3#x]
: +- Generate explode(outer(c2#x)), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1460,11 +1460,11 @@ Project [c1#x, c2#x, sum(c2) OVER (ORDER BY c1 ASC NULLS FIRST RANGE BETWEEN UNB
: +- Project [c2#x, c1#x]
: +- Filter (c1#x >= outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1486,17 +1486,17 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1519,17 +1519,17 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter (c1#x > outer(c2#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1551,17 +1551,17 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1583,17 +1583,17 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter (c1#x > outer(c2#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1615,17 +1615,17 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1647,17 +1647,17 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter (c1#x > outer(c2#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1680,17 +1680,17 @@ Project [c1#x, c2#x, count(c2)#xL]
: :- Aggregate [count(c2#x) AS count(c2)#xL]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Aggregate [count(c2#x) AS count(c2)#xL]
: +- Filter (c1#x > outer(c2#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1712,17 +1712,17 @@ Project [c1#x, c2#x, c1#x, c2#x]
: :- Project [c1#x, c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x, c1#x]
: +- Filter (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1743,16 +1743,16 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter ((c1#x = outer(c1#x)) AND (c2#x >= outer(c2#x)))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1773,16 +1773,16 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1804,16 +1804,16 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter ((c1#x = outer(c1#x)) AND (c2#x >= outer(c2#x)))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1834,16 +1834,16 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter ((c1#x = outer(c1#x)) AND (c2#x >= outer(c2#x)))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1864,16 +1864,16 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter ((c1#x = outer(c1#x)) AND (c2#x >= outer(c2#x)))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1894,16 +1894,16 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter ((c1#x = outer(c1#x)) AND (c2#x >= outer(c2#x)))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1924,16 +1924,16 @@ Project [c1#x, c2#x, c2#x]
: :- Project [c2#x]
: : +- Filter ((c1#x = outer(c1#x)) AND (c2#x >= outer(c2#x)))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -1957,17 +1957,17 @@ Project [c1#x, c2#x, c2#x]
: :- Aggregate [c2#x], [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Aggregate [c2#x], [c2#x]
: +- Filter (c1#x > outer(c2#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2019,17 +2019,17 @@ Project [c1#x, c2#x, sum(c2) OVER (ORDER BY c1 ASC NULLS FIRST RANGE BETWEEN UNB
: : +- Project [c2#x, c1#x]
: : +- Filter (c1#x >= outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [cast(c2#x as bigint) AS c2#xL]
: +- Project [c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2046,21 +2046,21 @@ Union false, false
: : +- Project [c1#x, c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
-: : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+: : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias spark_catalog.default.t1
-: +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+: +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- Project [c1#x, c2#x, c1#x, c2#x]
+- Join Inner
:- SubqueryAlias spark_catalog.default.t1
- : +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t4
- +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2092,17 +2092,17 @@ Union false, false
: : :- Project [c2#x]
: : : +- Filter (c1#x = outer(c1#x))
: : : +- SubqueryAlias spark_catalog.default.t2
-: : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+: : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : : +- LocalRelation [col1#x, col2#x]
: : +- Project [c2#x]
: : +- Filter (c1#x = outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t4
-: : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+: : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias spark_catalog.default.t1
-: +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+: +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- Project [c1#x, c2#x, c2#x]
@@ -2112,17 +2112,17 @@ Union false, false
: :- Project [c2#x]
: : +- Filter (outer(c1#x) <= c1#x)
: : +- SubqueryAlias spark_catalog.default.t1
- : : +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter (c1#x < outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t2
- +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2155,30 +2155,30 @@ Project [c1#x, c2#x, c2#x]
: : :- Project [c2#x]
: : : +- Filter (c1#x = outer(c1#x))
: : : +- SubqueryAlias spark_catalog.default.t2
- : : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : : +- LocalRelation [col1#x, col2#x]
: : +- Project [c2#x]
: : +- Filter (c1#x > outer(c2#x))
: : +- SubqueryAlias spark_catalog.default.t4
- : : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Intersect All true
: :- Project [c1#x]
: : +- Filter (c1#x <= outer(c2#x))
: : +- SubqueryAlias spark_catalog.default.t4
- : : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter NOT (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2210,30 +2210,30 @@ Project [c1#x, c2#x, c2#x]
: : :- Project [c2#x]
: : : +- Filter (c1#x = outer(c1#x))
: : : +- SubqueryAlias spark_catalog.default.t2
- : : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : : +- LocalRelation [col1#x, col2#x]
: : +- Project [c2#x]
: : +- Filter (c1#x > outer(c2#x))
: : +- SubqueryAlias spark_catalog.default.t4
- : : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Except All true
: :- Project [c1#x]
: : +- Filter (c1#x <= outer(c2#x))
: : +- SubqueryAlias spark_catalog.default.t4
- : : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c2#x]
: +- Filter NOT (c1#x = outer(c1#x))
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2258,17 +2258,17 @@ Project [c1#x, c2#x, sum(c1)#xL]
: : +- Project [c1#x, c2#x]
: : +- Filter (c1#x <= outer(c1#x))
: : +- SubqueryAlias spark_catalog.default.t2
- : : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias rhs
: +- Project [c1#x, c2#x]
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2290,7 +2290,7 @@ org.apache.spark.sql.catalyst.ExtendedAnalysisException
"errorClass" : "UNSUPPORTED_SUBQUERY_EXPRESSION_CATEGORY.ACCESSING_OUTER_QUERY_COLUMN_IS_NOT_ALLOWED",
"sqlState" : "0A000",
"messageParameters" : {
- "treeNode" : "Filter (c1#x > outer(c2#x))\n+- SubqueryAlias spark_catalog.default.t4\n +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])\n +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]\n +- LocalRelation [col1#x, col2#x]\n"
+ "treeNode" : "Filter (c1#x > outer(c2#x))\n+- SubqueryAlias spark_catalog.default.t4\n +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])\n +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]\n +- LocalRelation [col1#x, col2#x]\n"
},
"queryContext" : [ {
"objectType" : "",
@@ -2317,7 +2317,7 @@ Project [c1#x, c2#x, id#xL]
+- LateralJoin lateral-subquery#x [], Inner
: +- Range (0, 3, step=1, splits=None)
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2332,7 +2332,7 @@ Project [c1#x, c2#x, c3#x]
: +- Generate explode(array(outer(c1#x), outer(c2#x))), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2347,7 +2347,7 @@ Project [c1#x, c2#x, v#x]
: +- Generate explode(outer(c2#x)), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2362,7 +2362,7 @@ Project [c1#x, c2#x, v#x]
: +- Generate explode(outer(c2#x)), true, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2391,7 +2391,7 @@ Project [c1#x, c2#x, c3#x]
: +- Generate explode(array(outer(c1#x), outer(c2#x))), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2406,7 +2406,7 @@ Project [c1#x, c2#x, c3#x]
: +- Generate explode(outer(c2#x)), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2421,7 +2421,7 @@ Project [c1#x, c2#x, c3#x]
: +- Generate explode(outer(c2#x)), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2436,7 +2436,7 @@ Project [c1#x, c2#x, col#x]
: +- Generate explode(array(outer(c1#x), outer(c2#x))), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2453,7 +2453,7 @@ Project [c1#x, c2#x, (outer(spark_catalog.default.t1.c1) + c3)#x]
: +- Generate explode(array(outer(c1#x), outer(c2#x))), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2471,7 +2471,7 @@ Project [c1#x, c2#x, (outer(spark_catalog.default.t1.c1) + c3)#x]
: +- Generate explode(array(outer(c1#x), outer(c2#x))), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2493,7 +2493,7 @@ Project [c1#x, c2#x, x#x, y#x]
: +- Generate explode(array(outer(c2#x), outer(c1#x))), false, [col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2519,7 +2519,7 @@ Project [c1#x, c2#x, col1#x, col2#x]
: +- Generate inline(array(struct(col1, 1, col2, a), struct(col1, 2, col2, b))), false, [col1#x, col2#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2534,7 +2534,7 @@ Project [c1#x, x#x, y#x]
: +- Generate inline(array(struct(col1, 1, col2, a), struct(col1, 2, col2, b))), false, [col1#x, col2#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2547,7 +2547,7 @@ Project [id#x, arr#x, col1#x, col2#x]
: +- Generate inline(outer(arr#x)), false, [col1#x, col2#x]
: +- OneRowRelation
+- SubqueryAlias array_struct
- +- View (`array_struct`, [id#x,arr#x])
+ +- View (`array_struct`, [id#x, arr#x])
+- Project [cast(col1#x as int) AS id#x, cast(col2#x as array<struct<col1:int,col2:string>>) AS arr#x]
+- LocalRelation [col1#x, col2#x]
@@ -2562,7 +2562,7 @@ Project [id#x, arr#x, k#x, v#x]
: +- Generate inline(outer(arr#x)), false, [col1#x, col2#x]
: +- OneRowRelation
+- SubqueryAlias array_struct
- +- View (`array_struct`, [id#x,arr#x])
+ +- View (`array_struct`, [id#x, arr#x])
+- Project [cast(col1#x as int) AS id#x, cast(col2#x as array<struct<col1:int,col2:string>>) AS arr#x]
+- LocalRelation [col1#x, col2#x]
@@ -2575,7 +2575,7 @@ Project [id#x, arr#x, col1#x, col2#x]
: +- Generate inline(outer(arr#x)), true, [col1#x, col2#x]
: +- OneRowRelation
+- SubqueryAlias array_struct
- +- View (`array_struct`, [id#x,arr#x])
+ +- View (`array_struct`, [id#x, arr#x])
+- Project [cast(col1#x as int) AS id#x, cast(col2#x as array<struct<col1:int,col2:string>>) AS arr#x]
+- LocalRelation [col1#x, col2#x]
@@ -2604,7 +2604,7 @@ Project [c1#x, c2#x, pos#x, c3#x]
: +- Generate posexplode(array(outer(c1#x), outer(c2#x))), false, [pos#x, col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2619,7 +2619,7 @@ Project [c1#x, c2#x, pos#x, c3#x]
: +- Generate posexplode(array(outer(c1#x), outer(c2#x))), false, [pos#x, col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2634,7 +2634,7 @@ Project [c1#x, c2#x, pos#x, v#x]
: +- Generate posexplode(outer(c2#x)), false, [pos#x, col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2649,7 +2649,7 @@ Project [c1#x, c2#x, pos#x, c3#x]
: +- Generate posexplode(outer(c2#x)), false, [pos#x, col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2664,7 +2664,7 @@ Project [c1#x, c2#x, pos#x, v#x]
: +- Generate posexplode(outer(c2#x)), true, [pos#x, col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2679,7 +2679,7 @@ Project [c1#x, c2#x, pos#x, c3#x]
: +- Generate posexplode(outer(c2#x)), false, [pos#x, col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2694,7 +2694,7 @@ Project [c1#x, c2#x, pos#x, c3#x]
: +- Generate posexplode(outer(c2#x)), true, [pos#x, col#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2728,7 +2728,7 @@ Project [key#x, c0#x, c1#x, c2#x, c3#x, c4#x]
: +- OneRowRelation
+- SubqueryAlias t1
+- SubqueryAlias json_table
- +- View (`json_table`, [key#x,jstring#x])
+ +- View (`json_table`, [key#x, jstring#x])
+- Project [cast(col1#x as string) AS key#x, cast(col2#x as string) AS jstring#x]
+- LocalRelation [col1#x, col2#x]
@@ -2744,7 +2744,7 @@ Project [key#x, c0#x, c1#x, c2#x, c3#x, c4#x]
: +- OneRowRelation
+- SubqueryAlias t1
+- SubqueryAlias json_table
- +- View (`json_table`, [key#x,jstring#x])
+ +- View (`json_table`, [key#x, jstring#x])
+- Project [cast(col1#x as string) AS key#x, cast(col2#x as string) AS jstring#x]
+- LocalRelation [col1#x, col2#x]
@@ -2762,7 +2762,7 @@ Project [key#x, f1#x, f2#x, f3#x, f4#x, f5#x]
: +- OneRowRelation
+- SubqueryAlias t1
+- SubqueryAlias json_table
- +- View (`json_table`, [key#x,jstring#x])
+ +- View (`json_table`, [key#x, jstring#x])
+- Project [cast(col1#x as string) AS key#x, cast(col2#x as string) AS jstring#x]
+- LocalRelation [col1#x, col2#x]
@@ -2780,7 +2780,7 @@ Project [key#x, f1#x, f2#x, f3#x, f4#x, f5#x]
: +- OneRowRelation
+- SubqueryAlias t1
+- SubqueryAlias json_table
- +- View (`json_table`, [key#x,jstring#x])
+ +- View (`json_table`, [key#x, jstring#x])
+- Project [cast(col1#x as string) AS key#x, cast(col2#x as string) AS jstring#x]
+- LocalRelation [col1#x, col2#x]
@@ -2800,7 +2800,7 @@ Project [col0#x, col1#x]
: +- Generate stack(2, Key, outer(c1#x), Value, outer(c2#x)), false, [col0#x, col1#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2815,7 +2815,7 @@ Project [x#x, y#x]
: +- Generate stack(1, outer(c1#x), outer(c2#x)), false, [col0#x, col1#x]
: +- OneRowRelation
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2830,11 +2830,11 @@ Project [col0#x, col1#x]
: +- OneRowRelation
+- Join Inner, (c1#x = c1#x)
:- SubqueryAlias spark_catalog.default.t1
- : +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t3
- +- View (`spark_catalog`.`default`.`t3`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t3`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as array<int>) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2873,11 +2873,11 @@ Project [c1#x, c2#x, c1#x, c2#x]
: +- Project [c1#x, c2#x]
: +- Filter ((outer(c1#x) = c1#x) AND (outer(c2#x) < c2#x))
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2894,11 +2894,11 @@ Project [c1#x, c2#x, c1#x, c2#x]
: +- Project [c1#x, c2#x]
: +- Filter (outer(c1#x) <= c1#x)
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2916,11 +2916,11 @@ Project [c1#x, c2#x, c1#x, m#x]
: +- Aggregate [c1#x], [c1#x, min(c2#x) AS m#x]
: +- Filter ((outer(c1#x) = c1#x) AND (outer(c2#x) < c2#x))
: +- SubqueryAlias spark_catalog.default.t2
- : +- View (`spark_catalog`.`default`.`t2`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t2`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2939,11 +2939,11 @@ Project [c1#x, c2#x, c1#x, m#x]
: +- Aggregate [c1#x], [c1#x, min(c2#x) AS m#x]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -2964,7 +2964,7 @@ Project [c1#x, c2#x, c2#x]
: : +- Project [c2#x]
: : +- Filter (outer(c1#x) <= c1#x)
: : +- SubqueryAlias spark_catalog.default.t4
- : : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- GlobalLimit 3
@@ -2973,11 +2973,11 @@ Project [c1#x, c2#x, c2#x]
: +- Project [c1#x]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
@@ -3002,17 +3002,17 @@ Project [c1#x, c2#x, t#x]
: :- Project [c2#x AS t#x]
: : +- Filter (outer(c1#x) <= c1#x)
: : +- SubqueryAlias spark_catalog.default.t4
- : : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: : +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- Project [c1#x AS t#x]
: +- Filter (outer(c1#x) = c1#x)
: +- SubqueryAlias spark_catalog.default.t4
- : +- View (`spark_catalog`.`default`.`t4`, [c1#x,c2#x])
+ : +- View (`spark_catalog`.`default`.`t4`, [c1#x, c2#x])
: +- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias spark_catalog.default.t1
- +- View (`spark_catalog`.`default`.`t1`, [c1#x,c2#x])
+ +- View (`spark_catalog`.`default`.`t1`, [c1#x, c2#x])
+- Project [cast(col1#x as int) AS c1#x, cast(col2#x as int) AS c2#x]
+- LocalRelation [col1#x, col2#x]
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/json-functions.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/json-functions.sql.out
index b6b11cd6e61a..5d83e3195be1 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/json-functions.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/json-functions.sql.out
@@ -252,7 +252,7 @@ SELECT json_tuple(jsonField, 'b', CAST(NULL AS STRING), a) FROM jsonTable
Project [c0#x, c1#x, c2#x]
+- Generate json_tuple(jsonField#x, b, cast(null as string), a#x), false, [c0#x, c1#x, c2#x]
+- SubqueryAlias jsontable
- +- View (`jsonTable`, [jsonField#x,a#x])
+ +- View (`jsonTable`, [jsonField#x, a#x])
+- Project [cast(col1#x as string) AS jsonField#x, cast(col2#x as string) AS a#x]
+- Project [col1#x, col2#x]
+- LocalRelation [col1#x, col2#x]
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/like-all.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/like-all.sql.out
index f2ac4bd40cdc..cc5967a3fc59 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/like-all.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/like-all.sql.out
@@ -23,7 +23,7 @@ SELECT company FROM like_all_table WHERE company LIKE ALL ('%oo%', '%go%')
Project [company#x]
+- Filter likeall(company#x, %oo%, %go%)
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -37,7 +37,7 @@ SELECT company FROM like_all_table WHERE company LIKE ALL ('microsoft', '%yoo%')
Project [company#x]
+- Filter likeall(company#x, microsoft, %yoo%)
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -60,7 +60,7 @@ FROM like_all_table
-- !query analysis
Project [company#x, CASE WHEN likeall(company#x, %oo%, %go%) THEN Y ELSE N END AS is_available#x, CASE WHEN (likeall(company#x, %oo%, go%) OR likeall(company#x, %in, ms%)) THEN Y ELSE N END AS mix#x]
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -74,7 +74,7 @@ SELECT company FROM like_all_table WHERE company LIKE ALL ('%oo%', pat)
Project [company#x]
+- Filter (company#x LIKE %oo% AND company#x LIKE pat#x)
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -88,7 +88,7 @@ SELECT company FROM like_all_table WHERE company NOT LIKE ALL ('%oo%', '%in', 'f
Project [company#x]
+- Filter notlikeall(company#x, %oo%, %in, fa%)
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -102,7 +102,7 @@ SELECT company FROM like_all_table WHERE company NOT LIKE ALL ('microsoft', '%yo
Project [company#x]
+- Filter notlikeall(company#x, microsoft, %yoo%)
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -116,7 +116,7 @@ SELECT company FROM like_all_table WHERE company NOT LIKE ALL ('%oo%', 'fa%')
Project [company#x]
+- Filter notlikeall(company#x, %oo%, fa%)
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -130,7 +130,7 @@ SELECT company FROM like_all_table WHERE NOT company LIKE ALL ('%oo%', 'fa%')
Project [company#x]
+- Filter NOT likeall(company#x, %oo%, fa%)
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -144,7 +144,7 @@ SELECT company FROM like_all_table WHERE company LIKE ALL ('%oo%', NULL)
Project [company#x]
+- Filter (company#x LIKE %oo% AND company#x LIKE cast(null as string))
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -158,7 +158,7 @@ SELECT company FROM like_all_table WHERE company NOT LIKE ALL ('%oo%', NULL)
Project [company#x]
+- Filter (NOT company#x LIKE %oo% AND NOT company#x LIKE cast(null as string))
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -172,7 +172,7 @@ SELECT company FROM like_all_table WHERE company LIKE ALL (NULL, NULL)
Project [company#x]
+- Filter (company#x LIKE cast(null as string) AND company#x LIKE cast(null as string))
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -186,7 +186,7 @@ SELECT company FROM like_all_table WHERE company NOT LIKE ALL (NULL, NULL)
Project [company#x]
+- Filter (NOT company#x LIKE cast(null as string) AND NOT company#x LIKE cast(null as string))
+- SubqueryAlias like_all_table
- +- View (`like_all_table`, [company#x,pat#x])
+ +- View (`like_all_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/like-any.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/like-any.sql.out
index 58986a38aaf7..91adb137e367 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/like-any.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/like-any.sql.out
@@ -23,7 +23,7 @@ SELECT company FROM like_any_table WHERE company LIKE ANY ('%oo%', '%in', 'fa%')
Project [company#x]
+- Filter likeany(company#x, %oo%, %in, fa%)
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -37,7 +37,7 @@ SELECT company FROM like_any_table WHERE company LIKE ANY ('microsoft', '%yoo%')
Project [company#x]
+- Filter likeany(company#x, microsoft, %yoo%)
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -60,7 +60,7 @@ FROM like_any_table
-- !query analysis
Project [company#x, CASE WHEN likeany(company#x, %oo%, %in, fa%) THEN Y ELSE N END AS is_available#x, CASE WHEN (likeany(company#x, %oo%, fa%) OR likeany(company#x, %in, ms%)) THEN Y ELSE N END AS mix#x]
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -74,7 +74,7 @@ SELECT company FROM like_any_table WHERE company LIKE ANY ('%zz%', pat)
Project [company#x]
+- Filter (company#x LIKE %zz% OR company#x LIKE pat#x)
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -88,7 +88,7 @@ SELECT company FROM like_any_table WHERE company NOT LIKE ANY ('%oo%', '%in', 'f
Project [company#x]
+- Filter notlikeany(company#x, %oo%, %in, fa%)
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -102,7 +102,7 @@ SELECT company FROM like_any_table WHERE company NOT LIKE ANY ('microsoft', '%yo
Project [company#x]
+- Filter notlikeany(company#x, microsoft, %yoo%)
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -116,7 +116,7 @@ SELECT company FROM like_any_table WHERE company NOT LIKE ANY ('%oo%', 'fa%')
Project [company#x]
+- Filter notlikeany(company#x, %oo%, fa%)
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -130,7 +130,7 @@ SELECT company FROM like_any_table WHERE NOT company LIKE ANY ('%oo%', 'fa%')
Project [company#x]
+- Filter NOT likeany(company#x, %oo%, fa%)
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -144,7 +144,7 @@ SELECT company FROM like_any_table WHERE company LIKE ANY ('%oo%', NULL)
Project [company#x]
+- Filter (company#x LIKE %oo% OR company#x LIKE cast(null as string))
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -158,7 +158,7 @@ SELECT company FROM like_any_table WHERE company NOT LIKE ANY ('%oo%', NULL)
Project [company#x]
+- Filter (NOT company#x LIKE %oo% OR NOT company#x LIKE cast(null as string))
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -172,7 +172,7 @@ SELECT company FROM like_any_table WHERE company LIKE ANY (NULL, NULL)
Project [company#x]
+- Filter (company#x LIKE cast(null as string) OR company#x LIKE cast(null as string))
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
@@ -186,7 +186,7 @@ SELECT company FROM like_any_table WHERE company NOT LIKE ANY (NULL, NULL)
Project [company#x]
+- Filter (NOT company#x LIKE cast(null as string) OR NOT company#x LIKE cast(null as string))
+- SubqueryAlias like_any_table
- +- View (`like_any_table`, [company#x,pat#x])
+ +- View (`like_any_table`, [company#x, pat#x])
+- Project [cast(company#x as string) AS company#x, cast(pat#x as string) AS pat#x]
+- Project [company#x, pat#x]
+- SubqueryAlias t1
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/linear-regression.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/linear-regression.sql.out
index 7c91139921b5..fa7d0d331eda 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/linear-regression.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/linear-regression.sql.out
@@ -17,7 +17,7 @@ SELECT regr_count(y, x) FROM testRegression
-- !query analysis
Aggregate [regr_count(y#x, x#x) AS regr_count(y, x)#xL]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -30,7 +30,7 @@ SELECT regr_count(y, x) FROM testRegression WHERE x IS NOT NULL
Aggregate [regr_count(y#x, x#x) AS regr_count(y, x)#xL]
+- Filter isnotnull(x#x)
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -42,7 +42,7 @@ SELECT k, count(*), regr_count(y, x) FROM testRegression GROUP BY k
-- !query analysis
Aggregate [k#x], [k#x, count(1) AS count(1)#xL, regr_count(y#x, x#x) AS regr_count(y, x)#xL]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -54,7 +54,7 @@ SELECT k, count(*) FILTER (WHERE x IS NOT NULL), regr_count(y, x) FROM testRegre
-- !query analysis
Aggregate [k#x], [k#x, count(1) FILTER (WHERE isnotnull(x#x)) AS count(1) FILTER (WHERE (x IS NOT NULL))#xL, regr_count(y#x, x#x) AS regr_count(y, x)#xL]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -66,7 +66,7 @@ SELECT regr_r2(y, x) FROM testRegression
-- !query analysis
Aggregate [regr_r2(cast(y#x as double), cast(x#x as double)) AS regr_r2(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -79,7 +79,7 @@ SELECT regr_r2(y, x) FROM testRegression WHERE x IS NOT NULL
Aggregate [regr_r2(cast(y#x as double), cast(x#x as double)) AS regr_r2(y, x)#x]
+- Filter isnotnull(x#x)
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -91,7 +91,7 @@ SELECT k, corr(y, x), regr_r2(y, x) FROM testRegression GROUP BY k
-- !query analysis
Aggregate [k#x], [k#x, corr(cast(y#x as double), cast(x#x as double)) AS corr(y, x)#x, regr_r2(cast(y#x as double), cast(x#x as double)) AS regr_r2(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -103,7 +103,7 @@ SELECT k, corr(y, x) FILTER (WHERE x IS NOT NULL), regr_r2(y, x) FROM testRegres
-- !query analysis
Aggregate [k#x], [k#x, corr(cast(y#x as double), cast(x#x as double)) FILTER (WHERE isnotnull(x#x)) AS corr(y, x) FILTER (WHERE (x IS NOT NULL))#x, regr_r2(cast(y#x as double), cast(x#x as double)) AS regr_r2(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -115,7 +115,7 @@ SELECT regr_avgx(y, x), regr_avgy(y, x) FROM testRegression
-- !query analysis
Aggregate [regr_avgx(y#x, x#x) AS regr_avgx(y, x)#x, regr_avgy(y#x, x#x) AS regr_avgy(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -128,7 +128,7 @@ SELECT regr_avgx(y, x), regr_avgy(y, x) FROM testRegression WHERE x IS NOT NULL
Aggregate [regr_avgx(y#x, x#x) AS regr_avgx(y, x)#x, regr_avgy(y#x, x#x) AS regr_avgy(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -140,7 +140,7 @@ SELECT k, avg(x), avg(y), regr_avgx(y, x), regr_avgy(y, x) FROM testRegression G
-- !query analysis
Aggregate [k#x], [k#x, avg(x#x) AS avg(x)#x, avg(y#x) AS avg(y)#x, regr_avgx(y#x, x#x) AS regr_avgx(y, x)#x, regr_avgy(y#x, x#x) AS regr_avgy(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -152,7 +152,7 @@ SELECT k, avg(x) FILTER (WHERE x IS NOT NULL AND y IS NOT NULL), avg(y) FILTER (
-- !query analysis
Aggregate [k#x], [k#x, avg(x#x) FILTER (WHERE (isnotnull(x#x) AND isnotnull(y#x))) AS avg(x) FILTER (WHERE ((x IS NOT NULL) AND (y IS NOT NULL)))#x, avg(y#x) FILTER (WHERE (isnotnull(x#x) AND isnotnull(y#x))) AS avg(y) FILTER (WHERE ((x IS NOT NULL) AND (y IS NOT NULL)))#x, regr_avgx(y#x, x#x) AS regr_avgx(y, x)#x, regr_avgy(y#x, x#x) AS regr_avgy(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -164,7 +164,7 @@ SELECT regr_sxx(y, x) FROM testRegression
-- !query analysis
Aggregate [regr_sxx(cast(y#x as double), cast(x#x as double)) AS regr_sxx(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -177,7 +177,7 @@ SELECT regr_sxx(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT NULL
Aggregate [regr_sxx(cast(y#x as double), cast(x#x as double)) AS regr_sxx(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -189,7 +189,7 @@ SELECT k, regr_sxx(y, x) FROM testRegression GROUP BY k
-- !query analysis
Aggregate [k#x], [k#x, regr_sxx(cast(y#x as double), cast(x#x as double)) AS regr_sxx(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -202,7 +202,7 @@ SELECT k, regr_sxx(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT NU
Aggregate [k#x], [k#x, regr_sxx(cast(y#x as double), cast(x#x as double)) AS regr_sxx(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -214,7 +214,7 @@ SELECT regr_sxy(y, x) FROM testRegression
-- !query analysis
Aggregate [regr_sxy(cast(y#x as double), cast(x#x as double)) AS regr_sxy(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -227,7 +227,7 @@ SELECT regr_sxy(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT NULL
Aggregate [regr_sxy(cast(y#x as double), cast(x#x as double)) AS regr_sxy(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -239,7 +239,7 @@ SELECT k, regr_sxy(y, x) FROM testRegression GROUP BY k
-- !query analysis
Aggregate [k#x], [k#x, regr_sxy(cast(y#x as double), cast(x#x as double)) AS regr_sxy(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -252,7 +252,7 @@ SELECT k, regr_sxy(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT NU
Aggregate [k#x], [k#x, regr_sxy(cast(y#x as double), cast(x#x as double)) AS regr_sxy(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -264,7 +264,7 @@ SELECT regr_syy(y, x) FROM testRegression
-- !query analysis
Aggregate [regr_syy(cast(y#x as double), cast(x#x as double)) AS regr_syy(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -277,7 +277,7 @@ SELECT regr_syy(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT NULL
Aggregate [regr_syy(cast(y#x as double), cast(x#x as double)) AS regr_syy(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -289,7 +289,7 @@ SELECT k, regr_syy(y, x) FROM testRegression GROUP BY k
-- !query analysis
Aggregate [k#x], [k#x, regr_syy(cast(y#x as double), cast(x#x as double)) AS regr_syy(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -302,7 +302,7 @@ SELECT k, regr_syy(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT NU
Aggregate [k#x], [k#x, regr_syy(cast(y#x as double), cast(x#x as double)) AS regr_syy(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -314,7 +314,7 @@ SELECT regr_slope(y, x) FROM testRegression
-- !query analysis
Aggregate [regr_slope(cast(y#x as double), cast(x#x as double)) AS regr_slope(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -327,7 +327,7 @@ SELECT regr_slope(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT NUL
Aggregate [regr_slope(cast(y#x as double), cast(x#x as double)) AS regr_slope(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -339,7 +339,7 @@ SELECT k, regr_slope(y, x) FROM testRegression GROUP BY k
-- !query analysis
Aggregate [k#x], [k#x, regr_slope(cast(y#x as double), cast(x#x as double)) AS regr_slope(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -352,7 +352,7 @@ SELECT k, regr_slope(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT
Aggregate [k#x], [k#x, regr_slope(cast(y#x as double), cast(x#x as double)) AS regr_slope(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -364,7 +364,7 @@ SELECT regr_intercept(y, x) FROM testRegression
-- !query analysis
Aggregate [regr_intercept(cast(y#x as double), cast(x#x as double)) AS regr_intercept(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -377,7 +377,7 @@ SELECT regr_intercept(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS NOT
Aggregate [regr_intercept(cast(y#x as double), cast(x#x as double)) AS regr_intercept(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -389,7 +389,7 @@ SELECT k, regr_intercept(y, x) FROM testRegression GROUP BY k
-- !query analysis
Aggregate [k#x], [k#x, regr_intercept(cast(y#x as double), cast(x#x as double)) AS regr_intercept(y, x)#x]
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
@@ -402,7 +402,7 @@ SELECT k, regr_intercept(y, x) FROM testRegression WHERE x IS NOT NULL AND y IS
Aggregate [k#x], [k#x, regr_intercept(cast(y#x as double), cast(x#x as double)) AS regr_intercept(y, x)#x]
+- Filter (isnotnull(x#x) AND isnotnull(y#x))
+- SubqueryAlias testregression
- +- View (`testRegression`, [k#x,y#x,x#x])
+ +- View (`testRegression`, [k#x, y#x, x#x])
+- Project [cast(k#x as int) AS k#x, cast(y#x as int) AS y#x, cast(x#x as int) AS x#x]
+- Project [k#x, y#x, x#x]
+- SubqueryAlias testRegression
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/mode.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/mode.sql.out
index 61b970a628e9..6fa1dcb4b75d 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/mode.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/mode.sql.out
@@ -49,7 +49,7 @@ SELECT mode(department), mode(salary) FROM basic_pays
-- !query analysis
Aggregate [mode(department#x, 0, 0, None) AS mode(department)#x, mode(salary#x, 0, 0, None) AS mode(salary)#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -62,7 +62,7 @@ SELECT department, mode(salary) FROM basic_pays GROUP BY department ORDER BY dep
Sort [department#x ASC NULLS FIRST], true
+- Aggregate [department#x], [department#x, mode(salary#x, 0, 0, None) AS mode(salary)#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -225,7 +225,7 @@ WHERE salary > 20000
Aggregate [mode(salary#x, 0, 0, Some(true)) AS mode() WITHIN GROUP (ORDER BY salary DESC)#x, mode(salary#x, 0, 0, Some(false)) AS mode() WITHIN GROUP (ORDER BY salary)#x]
+- Filter (salary#x > 20000)
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -240,7 +240,7 @@ FROM basic_pays
-- !query analysis
Aggregate [mode(salary#x, 0, 0, Some(true)) AS mode() WITHIN GROUP (ORDER BY salary DESC)#x, mode(salary#x, 0, 0, Some(false)) AS mode() WITHIN GROUP (ORDER BY salary)#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -255,7 +255,7 @@ FROM basic_pays
-- !query analysis
Aggregate [mode(salary#x, 0, 0, Some(true)) AS mode() WITHIN GROUP (ORDER BY salary DESC)#x, mode(salary#x, 0, 0, Some(true)) FILTER (WHERE (salary#x > 10000)) AS mode() WITHIN GROUP (ORDER BY salary DESC) FILTER (WHERE (salary > 10000))#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -274,7 +274,7 @@ ORDER BY department
Sort [department#x ASC NULLS FIRST], true
+- Aggregate [department#x], [department#x, mode(salary#x, 0, 0, Some(true)) AS mode() WITHIN GROUP (ORDER BY salary DESC)#x, mode(salary#x, 0, 0, Some(true)) FILTER (WHERE (salary#x > 10000)) AS mode() WITHIN GROUP (ORDER BY salary DESC) FILTER (WHERE (salary > 10000))#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -296,7 +296,7 @@ Sort [salary#x ASC NULLS FIRST], true
+- Window [mode(salary#x, 0, 0, Some(true)) windowspecdefinition(department#x, specifiedwindowframe(RowFrame, unboundedpreceding$(), unboundedfollowing$())) AS mode() WITHIN GROUP (ORDER BY salary DESC) OVER (PARTITION BY department ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)#x], [department#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -318,7 +318,7 @@ Sort [salary#x ASC NULLS FIRST], true
+- Window [mode(salary#x, 0, 0, Some(true)) windowspecdefinition(department#x, salary#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS mode() WITHIN GROUP (ORDER BY salary DESC) OVER (PARTITION BY department ORDER BY salary ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [department#x], [salary#x ASC NULLS FIRST]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -340,7 +340,7 @@ Sort [salary#x ASC NULLS FIRST], true
+- Window [mode(salary#x, 0, 0, Some(true)) windowspecdefinition(department#x, specifiedwindowframe(RowFrame, unboundedpreceding$(), 1)) AS mode() WITHIN GROUP (ORDER BY salary DESC) OVER (PARTITION BY department ROWS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING)#x], [department#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -365,7 +365,7 @@ Sort [salary#x ASC NULLS FIRST], true
+- Project [employee_name#x, department#x, salary#x]
+- Filter (salary#x > 8900)
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -485,7 +485,7 @@ FROM intervals
-- !query analysis
Aggregate [mode(dt#x, 0, 0, Some(true)) AS mode() WITHIN GROUP (ORDER BY dt DESC)#x, mode(dt#x, 0, 0, Some(false)) AS mode() WITHIN GROUP (ORDER BY dt)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -504,7 +504,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, mode(ym#x, 0, 0, Some(true)) AS mode() WITHIN GROUP (ORDER BY ym DESC)#x, mode(dt#x, 0, 0, Some(false)) AS mode() WITHIN GROUP (ORDER BY dt)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/named-function-arguments.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/named-function-arguments.sql.out
index 735e5a9da40b..f0b78dc46873 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/named-function-arguments.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/named-function-arguments.sql.out
@@ -69,7 +69,7 @@ SELECT hex(count_min_sketch(t2d, seed => 1, epsilon => 0.5d, confidence => 0.5d)
-- !query analysis
Aggregate [hex(count_min_sketch(t2d#xL, 0.5, 0.5, 1, 0, 0)) AS hex(count_min_sketch(t2d, 0.5, 0.5, 1))#x]
+- SubqueryAlias t2
- +- View (`t2`, [t2a#x,t2b#x,t2c#x,t2d#xL,t2e#x,t2f#x,t2g#x,t2h#x,t2i#x])
+ +- View (`t2`, [t2a#x, t2b#x, t2c#x, t2d#xL, t2e#x, t2f#x, t2g#x, t2h#x, t2i#x])
+- Project [cast(t2a#x as string) AS t2a#x, cast(t2b#x as smallint) AS t2b#x, cast(t2c#x as int) AS t2c#x, cast(t2d#xL as bigint) AS t2d#xL, cast(t2e#x as float) AS t2e#x, cast(t2f#x as double) AS t2f#x, cast(t2g#x as double) AS t2g#x, cast(t2h#x as timestamp) AS t2h#x, cast(t2i#x as date) AS t2i#x]
+- Project [t2a#x, t2b#x, t2c#x, t2d#xL, t2e#x, t2f#x, t2g#x, t2h#x, t2i#x]
+- SubqueryAlias t2
@@ -81,7 +81,7 @@ SELECT hex(count_min_sketch(seed => 1, epsilon => 0.5d, confidence => 0.5d, colu
-- !query analysis
Aggregate [hex(count_min_sketch(t2d#xL, 0.5, 0.5, 1, 0, 0)) AS hex(count_min_sketch(t2d, 0.5, 0.5, 1))#x]
+- SubqueryAlias t2
- +- View (`t2`, [t2a#x,t2b#x,t2c#x,t2d#xL,t2e#x,t2f#x,t2g#x,t2h#x,t2i#x])
+ +- View (`t2`, [t2a#x, t2b#x, t2c#x, t2d#xL, t2e#x, t2f#x, t2g#x, t2h#x, t2i#x])
+- Project [cast(t2a#x as string) AS t2a#x, cast(t2b#x as smallint) AS t2b#x, cast(t2c#x as int) AS t2c#x, cast(t2d#xL as bigint) AS t2d#xL, cast(t2e#x as float) AS t2e#x, cast(t2f#x as double) AS t2f#x, cast(t2g#x as double) AS t2g#x, cast(t2h#x as timestamp) AS t2h#x, cast(t2i#x as date) AS t2i#x]
+- Project [t2a#x, t2b#x, t2c#x, t2d#xL, t2e#x, t2f#x, t2g#x, t2h#x, t2i#x]
+- SubqueryAlias t2
@@ -93,7 +93,7 @@ SELECT hex(count_min_sketch(t2d, 0.5d, seed => 1, confidence => 0.5d)) FROM t2
-- !query analysis
Aggregate [hex(count_min_sketch(t2d#xL, 0.5, 0.5, 1, 0, 0)) AS hex(count_min_sketch(t2d, 0.5, 0.5, 1))#x]
+- SubqueryAlias t2
- +- View (`t2`, [t2a#x,t2b#x,t2c#x,t2d#xL,t2e#x,t2f#x,t2g#x,t2h#x,t2i#x])
+ +- View (`t2`, [t2a#x, t2b#x, t2c#x, t2d#xL, t2e#x, t2f#x, t2g#x, t2h#x, t2i#x])
+- Project [cast(t2a#x as string) AS t2a#x, cast(t2b#x as smallint) AS t2b#x, cast(t2c#x as int) AS t2c#x, cast(t2d#xL as bigint) AS t2d#xL, cast(t2e#x as float) AS t2e#x, cast(t2f#x as double) AS t2f#x, cast(t2g#x as double) AS t2g#x, cast(t2h#x as timestamp) AS t2h#x, cast(t2i#x as date) AS t2i#x]
+- Project [t2a#x, t2b#x, t2c#x, t2d#xL, t2e#x, t2f#x, t2g#x, t2h#x, t2i#x]
+- SubqueryAlias t2
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/natural-join.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/natural-join.sql.out
index 41c8876a7d25..f8da5c519635 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/natural-join.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/natural-join.sql.out
@@ -74,13 +74,13 @@ Project [k#x, v1#x, v2#x]
+- Project [k#x, v1#x, v2#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -95,13 +95,13 @@ Project [k#x, v1#x, v2#x]
+- Project [k#x, v1#x, v2#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -116,13 +116,13 @@ Sort [v1#x ASC NULLS FIRST, v2#x ASC NULLS FIRST], true
+- Project [k#x, v1#x, v2#x]
+- Join LeftOuter, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -137,13 +137,13 @@ Sort [v1#x ASC NULLS FIRST, v2#x ASC NULLS FIRST], true
+- Project [k#x, v1#x, v2#x]
+- Join RightOuter, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -157,13 +157,13 @@ Aggregate [count(1) AS count(1)#xL]
+- Project [coalesce(k#x, k#x) AS k#x, v1#x, v2#x]
+- Join FullOuter, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -177,13 +177,13 @@ Project [k#x]
+- Project [k#x, v1#x, v2#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -198,13 +198,13 @@ Project [k#x]
+- Project [k#x, v1#x, v2#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -218,13 +218,13 @@ Project [k#x, v1#x]
+- Project [k#x, v1#x, v2#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -238,13 +238,13 @@ Project [k#x, v2#x]
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -260,13 +260,13 @@ Project [k#x, v1#x, v2#x]
+- Project [k#x, v1#x, v2#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -282,13 +282,13 @@ Project [k#x]
+- Project [k#x, v1#x, v2#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -302,13 +302,13 @@ Project [k#x, v1#x, k#x, v2#x]
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -322,13 +322,13 @@ Project [k#x, v1#x, v2#x, k#x]
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -342,13 +342,13 @@ Project [k#x, k#x]
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -364,13 +364,13 @@ Project [k#x]
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -385,13 +385,13 @@ Sort [key#x ASC NULLS FIRST], true
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -406,13 +406,13 @@ Project [k#x, k#x]
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -428,13 +428,13 @@ Project [k#x, v1#x, v2#x]
+- Project [k#x, v1#x, v2#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -450,13 +450,13 @@ Project [k#x, v1#x, k#x, v2#x]
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -472,13 +472,13 @@ Project [v1#x, k#x]
+- Project [k#x, v1#x, v2#x, k#x]
+- Join Inner, (k#x = k#x)
:- SubqueryAlias nt1
- : +- View (`nt1`, [k#x,v1#x])
+ : +- View (`nt1`, [k#x, v1#x])
: +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: +- Project [k#x, v1#x]
: +- SubqueryAlias nt1
: +- LocalRelation [k#x, v1#x]
+- SubqueryAlias nt2
- +- View (`nt2`, [k#x,v2#x])
+ +- View (`nt2`, [k#x, v2#x])
+- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
+- Project [k#x, v2#x]
+- SubqueryAlias nt2
@@ -515,19 +515,19 @@ Project [k#x, v1#x, v2#x, v3#x]
:- Project [k#x, v1#x, v2#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias nt1
- : : +- View (`nt1`, [k#x,v1#x])
+ : : +- View (`nt1`, [k#x, v1#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: : +- Project [k#x, v1#x]
: : +- SubqueryAlias nt1
: : +- LocalRelation [k#x, v1#x]
: +- SubqueryAlias nt2
- : +- View (`nt2`, [k#x,v2#x])
+ : +- View (`nt2`, [k#x, v2#x])
: +- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
: +- Project [k#x, v2#x]
: +- SubqueryAlias nt2
: +- LocalRelation [k#x, v2#x]
+- SubqueryAlias nt3
- +- View (`nt3`, [k#x,v3#x])
+ +- View (`nt3`, [k#x, v3#x])
+- Project [cast(k#x as string) AS k#x, cast(v3#x as int) AS v3#x]
+- Project [k#x, v3#x]
+- SubqueryAlias nt3
@@ -543,19 +543,19 @@ Project [k#x, v1#x, k#x, v2#x, k#x, v3#x]
:- Project [k#x, v1#x, v2#x, k#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias nt1
- : : +- View (`nt1`, [k#x,v1#x])
+ : : +- View (`nt1`, [k#x, v1#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: : +- Project [k#x, v1#x]
: : +- SubqueryAlias nt1
: : +- LocalRelation [k#x, v1#x]
: +- SubqueryAlias nt2
- : +- View (`nt2`, [k#x,v2#x])
+ : +- View (`nt2`, [k#x, v2#x])
: +- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
: +- Project [k#x, v2#x]
: +- SubqueryAlias nt2
: +- LocalRelation [k#x, v2#x]
+- SubqueryAlias nt3
- +- View (`nt3`, [k#x,v3#x])
+ +- View (`nt3`, [k#x, v3#x])
+- Project [cast(k#x as string) AS k#x, cast(v3#x as int) AS v3#x]
+- Project [k#x, v3#x]
+- SubqueryAlias nt3
@@ -570,19 +570,19 @@ Project [k#x, v1#x, k#x, v2#x, k#x, v3#x]
:- Project [k#x, v1#x, v2#x, k#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias nt1
- : : +- View (`nt1`, [k#x,v1#x])
+ : : +- View (`nt1`, [k#x, v1#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: : +- Project [k#x, v1#x]
: : +- SubqueryAlias nt1
: : +- LocalRelation [k#x, v1#x]
: +- SubqueryAlias nt2
- : +- View (`nt2`, [k#x,v2#x])
+ : +- View (`nt2`, [k#x, v2#x])
: +- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
: +- Project [k#x, v2#x]
: +- SubqueryAlias nt2
: +- LocalRelation [k#x, v2#x]
+- SubqueryAlias nt3
- +- View (`nt3`, [k#x,v3#x])
+ +- View (`nt3`, [k#x, v3#x])
+- Project [cast(k#x as string) AS k#x, cast(v3#x as int) AS v3#x]
+- Project [k#x, v3#x]
+- SubqueryAlias nt3
@@ -597,19 +597,19 @@ Project [k#x, v1#x, v2#x, k#x, v3#x]
:- Project [k#x, v1#x, v2#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias nt1
- : : +- View (`nt1`, [k#x,v1#x])
+ : : +- View (`nt1`, [k#x, v1#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: : +- Project [k#x, v1#x]
: : +- SubqueryAlias nt1
: : +- LocalRelation [k#x, v1#x]
: +- SubqueryAlias nt2
- : +- View (`nt2`, [k#x,v2#x])
+ : +- View (`nt2`, [k#x, v2#x])
: +- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
: +- Project [k#x, v2#x]
: +- SubqueryAlias nt2
: +- LocalRelation [k#x, v2#x]
+- SubqueryAlias nt3
- +- View (`nt3`, [k#x,v3#x])
+ +- View (`nt3`, [k#x, v3#x])
+- Project [cast(k#x as string) AS k#x, cast(v3#x as int) AS v3#x]
+- Project [k#x, v3#x]
+- SubqueryAlias nt3
@@ -625,19 +625,19 @@ Project [k#x, v1#x, v2#x, k#x, v3#x]
:- Project [k#x, v1#x, v2#x, k#x]
: +- Join Inner, (k#x = k#x)
: :- SubqueryAlias nt1
- : : +- View (`nt1`, [k#x,v1#x])
+ : : +- View (`nt1`, [k#x, v1#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: : +- Project [k#x, v1#x]
: : +- SubqueryAlias nt1
: : +- LocalRelation [k#x, v1#x]
: +- SubqueryAlias nt2
- : +- View (`nt2`, [k#x,v2#x])
+ : +- View (`nt2`, [k#x, v2#x])
: +- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
: +- Project [k#x, v2#x]
: +- SubqueryAlias nt2
: +- LocalRelation [k#x, v2#x]
+- SubqueryAlias nt3
- +- View (`nt3`, [k#x,v3#x])
+ +- View (`nt3`, [k#x, v3#x])
+- Project [cast(k#x as string) AS k#x, cast(v3#x as int) AS v3#x]
+- Project [k#x, v3#x]
+- SubqueryAlias nt3
@@ -655,25 +655,25 @@ Project [k#x, v1#x, k#x, v2#x, k#x, v3#x, k#x, v4#x]
: :- Project [k#x, v1#x, v2#x, k#x]
: : +- Join Inner, (k#x = k#x)
: : :- SubqueryAlias nt1
- : : : +- View (`nt1`, [k#x,v1#x])
+ : : : +- View (`nt1`, [k#x, v1#x])
: : : +- Project [cast(k#x as string) AS k#x, cast(v1#x as int) AS v1#x]
: : : +- Project [k#x, v1#x]
: : : +- SubqueryAlias nt1
: : : +- LocalRelation [k#x, v1#x]
: : +- SubqueryAlias nt2
- : : +- View (`nt2`, [k#x,v2#x])
+ : : +- View (`nt2`, [k#x, v2#x])
: : +- Project [cast(k#x as string) AS k#x, cast(v2#x as int) AS v2#x]
: : +- Project [k#x, v2#x]
: : +- SubqueryAlias nt2
: : +- LocalRelation [k#x, v2#x]
: +- SubqueryAlias nt3
- : +- View (`nt3`, [k#x,v3#x])
+ : +- View (`nt3`, [k#x, v3#x])
: +- Project [cast(k#x as string) AS k#x, cast(v3#x as int) AS v3#x]
: +- Project [k#x, v3#x]
: +- SubqueryAlias nt3
: +- LocalRelation [k#x, v3#x]
+- SubqueryAlias nt4
- +- View (`nt4`, [k#x,v4#x])
+ +- View (`nt4`, [k#x, v4#x])
+- Project [cast(k#x as string) AS k#x, cast(v4#x as int) AS v4#x]
+- Project [k#x, v4#x]
+- SubqueryAlias nt4
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/order-by-all.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/order-by-all.sql.out
index 71f336624593..729fea0cf858 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/order-by-all.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/order-by-all.sql.out
@@ -24,7 +24,7 @@ select g from data order by all
Sort [g#x ASC NULLS FIRST], true
+- Project [g#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -37,7 +37,7 @@ select * from data order by all
Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -50,7 +50,7 @@ select * from data order by aLl
Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -63,7 +63,7 @@ select * from data order by all asc
Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -76,7 +76,7 @@ select * from data order by all desc
Sort [g#x DESC NULLS LAST, i#x DESC NULLS LAST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -89,7 +89,7 @@ select * from data order by all nulls first
Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -102,7 +102,7 @@ select * from data order by all nulls last
Sort [g#x ASC NULLS LAST, i#x ASC NULLS LAST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -115,7 +115,7 @@ select * from data order by all asc nulls first
Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -128,7 +128,7 @@ select * from data order by all desc nulls first
Sort [g#x DESC NULLS FIRST, i#x DESC NULLS FIRST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -141,7 +141,7 @@ select * from data order by all asc nulls last
Sort [g#x ASC NULLS LAST, i#x ASC NULLS LAST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -154,7 +154,7 @@ select * from data order by all desc nulls last
Sort [g#x DESC NULLS LAST, i#x DESC NULLS LAST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -168,14 +168,14 @@ Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST], true
+- Union false, false
:- Project [g#x, i#x]
: +- SubqueryAlias data
- : +- View (`data`, [g#x,i#x])
+ : +- View (`data`, [g#x, i#x])
: +- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
: +- Project [g#x, i#x]
: +- SubqueryAlias data
: +- LocalRelation [g#x, i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -190,14 +190,14 @@ Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST], true
+- Union false, false
:- Project [g#x, i#x]
: +- SubqueryAlias data
- : +- View (`data`, [g#x,i#x])
+ : +- View (`data`, [g#x, i#x])
: +- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
: +- Project [g#x, i#x]
: +- SubqueryAlias data
: +- LocalRelation [g#x, i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
@@ -212,7 +212,7 @@ GlobalLimit 2
+- Sort [g#x ASC NULLS FIRST, i#x ASC NULLS FIRST], true
+- Project [g#x, i#x]
+- SubqueryAlias data
- +- View (`data`, [g#x,i#x])
+ +- View (`data`, [g#x, i#x])
+- Project [cast(g#x as int) AS g#x, cast(i#x as int) AS i#x]
+- Project [g#x, i#x]
+- SubqueryAlias data
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/order-by-ordinal.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/order-by-ordinal.sql.out
index 2e877714f2b5..4bf21d02f9a8 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/order-by-ordinal.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/order-by-ordinal.sql.out
@@ -28,7 +28,7 @@ select * from data order by 1 desc
Sort [a#x DESC NULLS LAST], true
+- Project [a#x, b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -41,7 +41,7 @@ select * from data order by 1 desc, b desc
Sort [a#x DESC NULLS LAST, b#x DESC NULLS LAST], true
+- Project [a#x, b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -54,7 +54,7 @@ select * from data order by 1 desc, 2 desc
Sort [a#x DESC NULLS LAST, b#x DESC NULLS LAST], true
+- Project [a#x, b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -67,7 +67,7 @@ select * from data order by 1 + 0 desc, b desc
Sort [(1 + 0) DESC NULLS LAST, b#x DESC NULLS LAST], true
+- Project [a#x, b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -143,7 +143,7 @@ select * from data sort by 1 desc
Sort [a#x DESC NULLS LAST], false
+- Project [a#x, b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -162,7 +162,7 @@ select * from data order by 0
Sort [0 ASC NULLS FIRST], true
+- Project [a#x, b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
@@ -175,7 +175,7 @@ select * from data sort by 0
Sort [0 ASC NULLS FIRST], false
+- Project [a#x, b#x]
+- SubqueryAlias data
- +- View (`data`, [a#x,b#x])
+ +- View (`data`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- SubqueryAlias data
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/outer-join.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/outer-join.sql.out
index 9c07012a0b45..32088db51ac6 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/outer-join.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/outer-join.sql.out
@@ -47,7 +47,7 @@ Filter (sum(coalesce(int_col1, int_col0))#xL > cast((coalesce(int_col1, int_col0
: +- SubqueryAlias t1
: +- LocalRelation [int_col1#x]
+- SubqueryAlias t2
- +- View (`t2`, [int_col0#x,int_col1#x])
+ +- View (`t2`, [int_col0#x, int_col1#x])
+- Project [cast(int_col0#x as int) AS int_col0#x, cast(int_col1#x as int) AS int_col1#x]
+- Project [int_col0#x, int_col1#x]
+- SubqueryAlias t2
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/percentiles.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/percentiles.sql.out
index 0e63ed9e126e..b5da559901c2 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/percentiles.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/percentiles.sql.out
@@ -67,7 +67,7 @@ FROM aggr
-- !query analysis
Aggregate [percentile_cont(v#x, cast(0.25 as double), false) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY v)#x, percentile_cont(v#x, cast(0.25 as double), false) FILTER (WHERE (k#x > 0)) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY v) FILTER (WHERE (k > 0))#x, percentile_cont(v#x, cast(0.25 as double), true) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY v DESC)#x, percentile_cont(v#x, cast(0.25 as double), true) FILTER (WHERE (k#x > 0)) AS percentile_cont(0.25) WITHIN GROUP (ORDE [...]
+- SubqueryAlias aggr
- +- View (`aggr`, [k#x,v#x])
+ +- View (`aggr`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias aggr
@@ -88,7 +88,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, percentile_cont(v#x, cast(0.25 as double), false) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY v)#x, percentile_cont(v#x, cast(0.25 as double), false) FILTER (WHERE (k#x > 0)) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY v) FILTER (WHERE (k > 0))#x, percentile_cont(v#x, cast(0.25 as double), true) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY v DESC)#x, percentile_cont(v#x, cast(0.25 as double), true) FILTER (WHERE (k#x > 0)) AS percentile_cont(0.25) WIT [...]
+- SubqueryAlias aggr
- +- View (`aggr`, [k#x,v#x])
+ +- View (`aggr`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias aggr
@@ -105,7 +105,7 @@ FROM aggr
-- !query analysis
Aggregate [percentile_disc(v#x, cast(0.25 as double), false, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY v)#x, percentile_disc(v#x, cast(0.25 as double), false, 0, 0, false) FILTER (WHERE (k#x > 0)) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY v) FILTER (WHERE (k > 0))#x, percentile_disc(v#x, cast(0.25 as double), true, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY v DESC)#x, percentile_disc(v#x, cast(0.25 as double), true, 0, 0, false) FILTER (WHERE (k [...]
+- SubqueryAlias aggr
- +- View (`aggr`, [k#x,v#x])
+ +- View (`aggr`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias aggr
@@ -126,7 +126,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, percentile_disc(v#x, cast(0.25 as double), false, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY v)#x, percentile_disc(v#x, cast(0.25 as double), false, 0, 0, false) FILTER (WHERE (k#x > 0)) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY v) FILTER (WHERE (k > 0))#x, percentile_disc(v#x, cast(0.25 as double), true, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY v DESC)#x, percentile_disc(v#x, cast(0.25 as double), true, 0, 0, false) F [...]
+- SubqueryAlias aggr
- +- View (`aggr`, [k#x,v#x])
+ +- View (`aggr`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias aggr
@@ -142,7 +142,7 @@ FROM aggr
-- !query analysis
Aggregate [median(v#x) AS median(v)#x, percentile(v#x, cast(0.5 as double), 1, 0, 0, false) AS percentile(v, 0.5, 1)#x, percentile_cont(v#x, cast(0.5 as double), false) AS percentile_cont(0.5) WITHIN GROUP (ORDER BY v)#x]
+- SubqueryAlias aggr
- +- View (`aggr`, [k#x,v#x])
+ +- View (`aggr`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias aggr
@@ -441,7 +441,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, median(v#x) AS median(v)#x, percentile(v#x, cast(0.5 as double), 1, 0, 0, false) AS percentile(v, 0.5, 1)#x, percentile_cont(v#x, cast(0.5 as double), false) AS percentile_cont(0.5) WITHIN GROUP (ORDER BY v)#x]
+- SubqueryAlias aggr
- +- View (`aggr`, [k#x,v#x])
+ +- View (`aggr`, [k#x, v#x])
+- Project [cast(k#x as int) AS k#x, cast(v#x as int) AS v#x]
+- Project [k#x, v#x]
+- SubqueryAlias aggr
@@ -466,7 +466,7 @@ Sort [salary#x ASC NULLS FIRST], true
+- Window [percentile_cont(salary#x, cast(0.25 as double), false) windowspecdefinition(department#x, specifiedwindowframe(RowFrame, unboundedpreceding$(), unboundedfollowing$())) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY salary) OVER (PARTITION BY department ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)#x, percentile_disc(salary#x, cast(0.25 as double), false, 0, 0, false) windowspecdefinition(department#x, specifiedwindowframe(RowFrame, unboundedpreceding$(), unb [...]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -652,7 +652,7 @@ Sort [salary#x ASC NULLS FIRST], true
+- Window [percentile_cont(salary#x, cast(0.25 as double), false) windowspecdefinition(department#x, specifiedwindowframe(RowFrame, unboundedpreceding$(), unboundedfollowing$())) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY salary) OVER (PARTITION BY department ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)#x, percentile_disc(salary#x, cast(0.25 as double), false, 0, 0, false) windowspecdefinition(department#x, specifiedwindowframe(RowFrame, unboundedpreceding$(), unb [...]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -681,7 +681,7 @@ Sort [salary#x ASC NULLS FIRST], true
+- Project [employee_name#x, department#x, salary#x]
+- Filter (salary#x > 8900)
+- SubqueryAlias basic_pays
- +- View (`basic_pays`, [employee_name#x,department#x,salary#x])
+ +- View (`basic_pays`, [employee_name#x, department#x, salary#x])
+- Project [cast(employee_name#x as string) AS employee_name#x, cast(department#x as string) AS department#x, cast(salary#x as int) AS salary#x]
+- Project [employee_name#x, department#x, salary#x]
+- SubqueryAlias basic_pays
@@ -899,7 +899,7 @@ FROM intervals
-- !query analysis
Aggregate [percentile_cont(dt#x, cast(0.25 as double), false) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY dt)#x, percentile_cont(dt#x, cast(0.25 as double), true) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY dt DESC)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -918,7 +918,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, percentile_cont(ym#x, cast(0.25 as double), false) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY ym)#x, percentile_cont(ym#x, cast(0.25 as double), true) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY ym DESC)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -937,7 +937,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, percentile_cont(dt2#x, cast(0.25 as double), false) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY dt2)#x, percentile_cont(dt2#x, cast(0.25 as double), true) AS percentile_cont(0.25) WITHIN GROUP (ORDER BY dt2 DESC)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -952,7 +952,7 @@ FROM intervals
-- !query analysis
Aggregate [percentile_disc(dt#x, cast(0.25 as double), false, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY dt)#x, percentile_disc(dt#x, cast(0.25 as double), true, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY dt DESC)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -971,7 +971,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, percentile_disc(ym#x, cast(0.25 as double), false, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY ym)#x, percentile_disc(ym#x, cast(0.25 as double), true, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY ym DESC)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -990,7 +990,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, percentile_disc(dt2#x, cast(0.25 as double), false, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY dt2)#x, percentile_disc(dt2#x, cast(0.25 as double), true, 0, 0, false) AS percentile_disc(0.25) WITHIN GROUP (ORDER BY dt2 DESC)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -1006,7 +1006,7 @@ FROM intervals
-- !query analysis
Aggregate [median(dt#x) AS median(dt)#x, percentile(dt#x, cast(0.5 as double), 1, 0, 0, false) AS percentile(dt, 0.5, 1)#x, percentile_cont(dt#x, cast(0.5 as double), false) AS percentile_cont(0.5) WITHIN GROUP (ORDER BY dt)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -1026,7 +1026,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, median(ym#x) AS median(ym)#x, percentile(ym#x, cast(0.5 as double), 1, 0, 0, false) AS percentile(ym, 0.5, 1)#x, percentile_cont(ym#x, cast(0.5 as double), false) AS percentile_cont(0.5) WITHIN GROUP (ORDER BY ym)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
@@ -1046,7 +1046,7 @@ ORDER BY k
Sort [k#x ASC NULLS FIRST], true
+- Aggregate [k#x], [k#x, median(dt2#x) AS median(dt2)#x, percentile(dt2#x, cast(0.5 as double), 1, 0, 0, false) AS percentile(dt2, 0.5, 1)#x, percentile_cont(dt2#x, cast(0.5 as double), false) AS percentile_cont(0.5) WITHIN GROUP (ORDER BY dt2)#x]
+- SubqueryAlias intervals
- +- View (`intervals`, [k#x,dt#x,ym#x,dt2#x])
+ +- View (`intervals`, [k#x, dt#x, ym#x, dt2#x])
+- Project [cast(k#x as int) AS k#x, cast(dt#x as interval month) AS dt#x, cast(ym#x as interval second) AS ym#x, cast(dt2#x as interval minute) AS dt2#x]
+- Project [k#x, dt#x, ym#x, dt2#x]
+- SubqueryAlias intervals
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/pivot.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/pivot.sql.out
index ead14bdd882d..c0a02dc29d60 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/pivot.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/pivot.sql.out
@@ -66,7 +66,7 @@ Project [year#x, dotNET#xL, Java#xL]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [year#x, course#x, earnings#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -85,7 +85,7 @@ Project [course#x, 2012#xL, 2013#xL]
+- Aggregate [course#x], [course#x, pivotfirst(year#x, sum(coursesales.earnings)#xL, 2012, 2013, 0, 0) AS __pivot_sum(coursesales.earnings) AS `sum(coursesales.earnings)`#x]
+- Aggregate [course#x, year#x], [course#x, year#x, sum(earnings#x) AS sum(coursesales.earnings)#xL]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -108,7 +108,7 @@ Project [year#x, dotNET_sum(earnings)#xL, dotNET_avg(earnings)#x, Java_sum(earni
+- SubqueryAlias __auto_generated_subquery_name
+- Project [year#x, course#x, earnings#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -131,7 +131,7 @@ Project [dotNET#xL, Java#xL]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [course#x, earnings#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -154,7 +154,7 @@ Project [dotNET_sum(earnings)#xL, dotNET_min(year)#x, Java_sum(earnings)#xL, Jav
+- SubqueryAlias __auto_generated_subquery_name
+- Project [year#x, course#x, earnings#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -180,13 +180,13 @@ Project [course#x, year#x, 1#xL, 2#xL]
+- Project [course#x, year#x, earnings#x, s#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias years
- +- View (`years`, [y#x,s#x])
+ +- View (`years`, [y#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(s#x as int) AS s#x]
+- Project [y#x, s#x]
+- SubqueryAlias years
@@ -212,13 +212,13 @@ Project [year#x, dotNET_sum(earnings)#xL, dotNET_min(s)#x, Java_sum(earnings)#xL
+- Project [course#x, year#x, earnings#x, s#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias years
- +- View (`years`, [y#x,s#x])
+ +- View (`years`, [y#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(s#x as int) AS s#x]
+- Project [y#x, s#x]
+- SubqueryAlias years
@@ -244,13 +244,13 @@ Project [year#x, dotNET#xL, Java#xL]
+- Project [course#x, year#x, earnings#x, s#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias years
- +- View (`years`, [y#x,s#x])
+ +- View (`years`, [y#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(s#x as int) AS s#x]
+- Project [y#x, s#x]
+- SubqueryAlias years
@@ -273,7 +273,7 @@ Project [2012_s#xL, 2013_s#xL, 2012_a#x, 2013_a#x, c#x]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [year#x AS y#x, course#x AS c#x, earnings#x AS e#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -296,7 +296,7 @@ Project [firstYear_s#xL, secondYear_s#xL, firstYear_a#x, secondYear_a#x, c#x]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [year#x AS y#x, course#x AS c#x, earnings#x AS e#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -380,7 +380,7 @@ Project [year#x, dotNET_CEIL(sum(earnings))#xL, dotNET_a1#x, Java_CEIL(sum(earni
+- SubqueryAlias __auto_generated_subquery_name
+- Project [year#x, course#x, earnings#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
@@ -429,13 +429,13 @@ Project [s#x, {dotNET, 2012}#xL, {Java, 2013}#xL]
+- Project [course#x, year#x, earnings#x, s#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias years
- +- View (`years`, [y#x,s#x])
+ +- View (`years`, [y#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(s#x as int) AS s#x]
+- Project [y#x, s#x]
+- SubqueryAlias years
@@ -461,13 +461,13 @@ Project [year#x, c1#xL, c2#xL]
+- Project [course#x, year#x, earnings#x, s#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias years
- +- View (`years`, [y#x,s#x])
+ +- View (`years`, [y#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(s#x as int) AS s#x]
+- Project [y#x, s#x]
+- SubqueryAlias years
@@ -556,13 +556,13 @@ Project [year#x, dotNET#x, Java#x]
+- Project [course#x, year#x, a#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias yearswithcomplextypes
- +- View (`yearsWithComplexTypes`, [y#x,a#x,m#x,s#x])
+ +- View (`yearsWithComplexTypes`, [y#x, a#x, m#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(a#x as array<int>) AS a#x, cast(m#x as map<string,int>) AS m#x, cast(s#x as struct<col1:int,col2:string>) AS s#x]
+- Project [y#x, a#x, m#x, s#x]
+- SubqueryAlias yearsWithComplexTypes
@@ -586,13 +586,13 @@ Project [year#x, {2012, dotNET}#x, {2013, Java}#x]
+- Project [course#x, year#x, y#x, a#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias yearswithcomplextypes
- +- View (`yearsWithComplexTypes`, [y#x,a#x,m#x,s#x])
+ +- View (`yearsWithComplexTypes`, [y#x, a#x, m#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(a#x as array<int>) AS a#x, cast(m#x as map<string,int>) AS m#x, cast(s#x as struct<col1:int,col2:string>) AS s#x]
+- Project [y#x, a#x, m#x, s#x]
+- SubqueryAlias yearsWithComplexTypes
@@ -618,13 +618,13 @@ Project [year#x, [1, 1]#xL, [2, 2]#xL]
+- Project [earnings#x, year#x, a#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias yearswithcomplextypes
- +- View (`yearsWithComplexTypes`, [y#x,a#x,m#x,s#x])
+ +- View (`yearsWithComplexTypes`, [y#x, a#x, m#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(a#x as array<int>) AS a#x, cast(m#x as map<string,int>) AS m#x, cast(s#x as struct<col1:int,col2:string>) AS s#x]
+- Project [y#x, a#x, m#x, s#x]
+- SubqueryAlias yearsWithComplexTypes
@@ -650,13 +650,13 @@ Project [year#x, {dotNET, [1, 1]}#xL, {Java, [2, 2]}#xL]
+- Project [course#x, earnings#x, year#x, a#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias yearswithcomplextypes
- +- View (`yearsWithComplexTypes`, [y#x,a#x,m#x,s#x])
+ +- View (`yearsWithComplexTypes`, [y#x, a#x, m#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(a#x as array<int>) AS a#x, cast(m#x as map<string,int>) AS m#x, cast(s#x as struct<col1:int,col2:string>) AS s#x]
+- Project [y#x, a#x, m#x, s#x]
+- SubqueryAlias yearsWithComplexTypes
@@ -682,13 +682,13 @@ Project [year#x, {1, a}#xL, {2, b}#xL]
+- Project [earnings#x, year#x, s#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias yearswithcomplextypes
- +- View (`yearsWithComplexTypes`, [y#x,a#x,m#x,s#x])
+ +- View (`yearsWithComplexTypes`, [y#x, a#x, m#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(a#x as array<int>) AS a#x, cast(m#x as map<string,int>) AS m#x, cast(s#x as struct<col1:int,col2:string>) AS s#x]
+- Project [y#x, a#x, m#x, s#x]
+- SubqueryAlias yearsWithComplexTypes
@@ -714,13 +714,13 @@ Project [year#x, {dotNET, {1, a}}#xL, {Java, {2, b}}#xL]
+- Project [course#x, earnings#x, year#x, s#x]
+- Join Inner, (year#x = y#x)
:- SubqueryAlias coursesales
- : +- View (`courseSales`, [course#x,year#x,earnings#x])
+ : +- View (`courseSales`, [course#x, year#x, earnings#x])
: +- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
: +- Project [course#x, year#x, earnings#x]
: +- SubqueryAlias courseSales
: +- LocalRelation [course#x, year#x, earnings#x]
+- SubqueryAlias yearswithcomplextypes
- +- View (`yearsWithComplexTypes`, [y#x,a#x,m#x,s#x])
+ +- View (`yearsWithComplexTypes`, [y#x, a#x, m#x, s#x])
+- Project [cast(y#x as int) AS y#x, cast(a#x as array<int>) AS a#x, cast(m#x as map<string,int>) AS m#x, cast(s#x as struct<col1:int,col2:string>) AS s#x]
+- Project [y#x, a#x, m#x, s#x]
+- SubqueryAlias yearsWithComplexTypes
@@ -786,7 +786,7 @@ Project [a#x, z#x, b#x, y#x, c#x, x#x, d#x, w#x, dotNET#xL, Java#xL]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [course#x, earnings#x, a AS a#x, z AS z#x, b AS b#x, y AS y#x, c AS c#x, x AS x#x, d AS d#x, w AS w#x]
+- SubqueryAlias coursesales
- +- View (`courseSales`, [course#x,year#x,earnings#x])
+ +- View (`courseSales`, [course#x, year#x, earnings#x])
+- Project [cast(course#x as string) AS course#x, cast(year#x as int) AS year#x, cast(earnings#x as int) AS earnings#x]
+- Project [course#x, year#x, earnings#x]
+- SubqueryAlias courseSales
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/aggregates_part1.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/aggregates_part1.sql.out
index beb30cb5e5bf..75eb7df4e212 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/aggregates_part1.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/aggregates_part1.sql.out
@@ -368,7 +368,7 @@ FROM regr_test WHERE x IN (10,20,30,80)
Aggregate [count(1) AS count(1)#xL, sum(x#x) AS sum(x)#xL, regr_sxx(cast(y#x as double), cast(x#x as double)) AS regr_sxx(y, x)#x, sum(y#x) AS sum(y)#xL, regr_syy(cast(y#x as double), cast(x#x as double)) AS regr_syy(y, x)#x, regr_sxy(cast(y#x as double), cast(x#x as double)) AS regr_sxy(y, x)#x]
+- Filter x#x IN (10,20,30,80)
+- SubqueryAlias regr_test
- +- View (`regr_test`, [x#x,y#x])
+ +- View (`regr_test`, [x#x, y#x])
+- Project [cast(x#x as int) AS x#x, cast(y#x as int) AS y#x]
+- Project [x#x, y#x]
+- SubqueryAlias regr_test
@@ -381,7 +381,7 @@ FROM regr_test
-- !query analysis
Aggregate [count(1) AS count(1)#xL, sum(x#x) AS sum(x)#xL, regr_sxx(cast(y#x as double), cast(x#x as double)) AS regr_sxx(y, x)#x, sum(y#x) AS sum(y)#xL, regr_syy(cast(y#x as double), cast(x#x as double)) AS regr_syy(y, x)#x, regr_sxy(cast(y#x as double), cast(x#x as double)) AS regr_sxy(y, x)#x]
+- SubqueryAlias regr_test
- +- View (`regr_test`, [x#x,y#x])
+ +- View (`regr_test`, [x#x, y#x])
+- Project [cast(x#x as int) AS x#x, cast(y#x as int) AS y#x]
+- Project [x#x, y#x]
+- SubqueryAlias regr_test
@@ -395,7 +395,7 @@ FROM regr_test WHERE x IN (10,20,30)
Aggregate [count(1) AS count(1)#xL, sum(x#x) AS sum(x)#xL, regr_sxx(cast(y#x as double), cast(x#x as double)) AS regr_sxx(y, x)#x, sum(y#x) AS sum(y)#xL, regr_syy(cast(y#x as double), cast(x#x as double)) AS regr_syy(y, x)#x, regr_sxy(cast(y#x as double), cast(x#x as double)) AS regr_sxy(y, x)#x]
+- Filter x#x IN (10,20,30)
+- SubqueryAlias regr_test
- +- View (`regr_test`, [x#x,y#x])
+ +- View (`regr_test`, [x#x, y#x])
+- Project [cast(x#x as int) AS x#x, cast(y#x as int) AS y#x]
+- Project [x#x, y#x]
+- SubqueryAlias regr_test
@@ -409,7 +409,7 @@ FROM regr_test WHERE x IN (80,100)
Aggregate [count(1) AS count(1)#xL, sum(x#x) AS sum(x)#xL, regr_sxx(cast(y#x as double), cast(x#x as double)) AS regr_sxx(y, x)#x, sum(y#x) AS sum(y)#xL, regr_syy(cast(y#x as double), cast(x#x as double)) AS regr_syy(y, x)#x, regr_sxy(cast(y#x as double), cast(x#x as double)) AS regr_sxy(y, x)#x]
+- Filter x#x IN (80,100)
+- SubqueryAlias regr_test
- +- View (`regr_test`, [x#x,y#x])
+ +- View (`regr_test`, [x#x, y#x])
+- Project [cast(x#x as int) AS x#x, cast(y#x as int) AS y#x]
+- Project [x#x, y#x]
+- SubqueryAlias regr_test
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/aggregates_part2.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/aggregates_part2.sql.out
index f71a78abe531..84c5a88e6b2a 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/aggregates_part2.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/aggregates_part2.sql.out
@@ -41,7 +41,7 @@ SELECT BIT_AND(b1) AS n1, BIT_OR(b2) AS n2 FROM bitwise_test where 1 = 0
Aggregate [bit_and(b1#x) AS n1#x, bit_or(b2#x) AS n2#x]
+- Filter (1 = 0)
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -54,7 +54,7 @@ SELECT BIT_AND(b4) AS n1, BIT_OR(b4) AS n2 FROM bitwise_test where b4 is null
Aggregate [bit_and(b4#xL) AS n1#xL, bit_or(b4#xL) AS n2#xL]
+- Filter isnull(b4#xL)
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -75,7 +75,7 @@ FROM bitwise_test
-- !query analysis
Aggregate [bit_and(cast(b1#x as tinyint)) AS a1#x, bit_and(cast(b2#x as smallint)) AS b1#x, bit_and(b3#x) AS c1#x, bit_and(b4#xL) AS d1#xL, bit_or(cast(b1#x as tinyint)) AS e7#x, bit_or(cast(b2#x as smallint)) AS f7#x, bit_or(b3#x) AS g7#x, bit_or(b4#xL) AS h3#xL]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -87,7 +87,7 @@ SELECT b1 , bit_and(b2), bit_or(b4) FROM bitwise_test GROUP BY b1
-- !query analysis
Aggregate [b1#x], [b1#x, bit_and(b2#x) AS bit_and(b2)#x, bit_or(b4#xL) AS bit_or(b4)#xL]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -100,7 +100,7 @@ SELECT b1, bit_and(b2) FROM bitwise_test GROUP BY b1 HAVING bit_and(b2) < 7
Filter (bit_and(b2)#x < 7)
+- Aggregate [b1#x], [b1#x, bit_and(b2#x) AS bit_and(b2)#x]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -115,7 +115,7 @@ Project [b1#x, b2#x, bit_and(b2) OVER (PARTITION BY b1 ORDER BY b2 ASC NULLS FIR
+- Window [bit_and(b2#x) windowspecdefinition(b1#x, b2#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS bit_and(b2) OVER (PARTITION BY b1 ORDER BY b2 ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [b1#x], [b2#x ASC NULLS FIRST]
+- Project [b1#x, b2#x]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -130,7 +130,7 @@ Project [b1#x, b2#x, bit_or(b2) OVER (PARTITION BY b1 ORDER BY b2 ASC NULLS FIRS
+- Window [bit_or(b2#x) windowspecdefinition(b1#x, b2#x ASC NULLS FIRST, specifiedwindowframe(RangeFrame, unboundedpreceding$(), currentrow$())) AS bit_or(b2) OVER (PARTITION BY b1 ORDER BY b2 ASC NULLS FIRST RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)#x], [b1#x], [b2#x ASC NULLS FIRST]
+- Project [b1#x, b2#x]
+- SubqueryAlias bitwise_test
- +- View (`bitwise_test`, [b1#x,b2#x,b3#x,b4#xL])
+ +- View (`bitwise_test`, [b1#x, b2#x, b3#x, b4#xL])
+- Project [cast(b1#x as int) AS b1#x, cast(b2#x as int) AS b2#x, cast(b3#x as int) AS b3#x, cast(b4#xL as bigint) AS b4#xL]
+- Project [b1#x, b2#x, b3#x, b4#xL]
+- SubqueryAlias bitwise_test
@@ -190,7 +190,7 @@ SELECT BOOL_AND(b1) AS n1, BOOL_OR(b3) AS n2 FROM bool_test WHERE 1 = 0
Aggregate [bool_and(b1#x) AS n1#x, bool_or(b3#x) AS n2#x]
+- Filter (1 = 0)
+- SubqueryAlias bool_test
- +- View (`bool_test`, [b1#x,b2#x,b3#x,b4#x])
+ +- View (`bool_test`, [b1#x, b2#x, b3#x, b4#x])
+- Project [cast(b1#x as boolean) AS b1#x, cast(b2#x as boolean) AS b2#x, cast(b3#x as boolean) AS b3#x, cast(b4#x as void) AS b4#x]
+- Project [b1#x, b2#x, b3#x, b4#x]
+- SubqueryAlias bool_test
@@ -209,7 +209,7 @@ FROM bool_test
-- !query analysis
Aggregate [bool_and(b1#x) AS f1#x, bool_and(b2#x) AS t2#x, bool_and(b3#x) AS f3#x, bool_and(cast(b4#x as boolean)) AS n4#x, bool_and(NOT b2#x) AS f5#x, bool_and(NOT b3#x) AS t6#x]
+- SubqueryAlias bool_test
- +- View (`bool_test`, [b1#x,b2#x,b3#x,b4#x])
+ +- View (`bool_test`, [b1#x, b2#x, b3#x, b4#x])
+- Project [cast(b1#x as boolean) AS b1#x, cast(b2#x as boolean) AS b2#x, cast(b3#x as boolean) AS b3#x, cast(b4#x as void) AS b4#x]
+- Project [b1#x, b2#x, b3#x, b4#x]
+- SubqueryAlias bool_test
@@ -228,7 +228,7 @@ FROM bool_test
-- !query analysis
Aggregate [every(b1#x) AS f1#x, every(b2#x) AS t2#x, every(b3#x) AS f3#x, every(cast(b4#x as boolean)) AS n4#x, every(NOT b2#x) AS f5#x, every(NOT b3#x) AS t6#x]
+- SubqueryAlias bool_test
- +- View (`bool_test`, [b1#x,b2#x,b3#x,b4#x])
+ +- View (`bool_test`, [b1#x, b2#x, b3#x, b4#x])
+- Project [cast(b1#x as boolean) AS b1#x, cast(b2#x as boolean) AS b2#x, cast(b3#x as boolean) AS b3#x, cast(b4#x as void) AS b4#x]
+- Project [b1#x, b2#x, b3#x, b4#x]
+- SubqueryAlias bool_test
@@ -247,7 +247,7 @@ FROM bool_test
-- !query analysis
Aggregate [bool_or(b1#x) AS t1#x, bool_or(b2#x) AS t2#x, bool_or(b3#x) AS f3#x, bool_or(cast(b4#x as boolean)) AS n4#x, bool_or(NOT b2#x) AS f5#x, bool_or(NOT b3#x) AS t6#x]
+- SubqueryAlias bool_test
- +- View (`bool_test`, [b1#x,b2#x,b3#x,b4#x])
+ +- View (`bool_test`, [b1#x, b2#x, b3#x, b4#x])
+- Project [cast(b1#x as boolean) AS b1#x, cast(b2#x as boolean) AS b2#x, cast(b3#x as boolean) AS b3#x, cast(b4#x as void) AS b4#x]
+- Project [b1#x, b2#x, b3#x, b4#x]
+- SubqueryAlias bool_test
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/create_view.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/create_view.sql.out
index bbf0127f0ef6..b200f255ff13 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/create_view.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/create_view.sql.out
@@ -124,7 +124,7 @@ SELECT * FROM viewtest
-- !query analysis
Project [a#x, b#x]
+- SubqueryAlias spark_catalog.default.viewtest
- +- View (`spark_catalog`.`default`.`viewtest`, [a#x,b#x])
+ +- View (`spark_catalog`.`default`.`viewtest`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Project [a#x, b#x]
+- Filter (a#x > 10)
@@ -149,7 +149,7 @@ SELECT * FROM viewtest
-- !query analysis
Project [a#x, b#x]
+- SubqueryAlias spark_catalog.default.viewtest
- +- View (`spark_catalog`.`default`.`viewtest`, [a#x,b#x])
+ +- View (`spark_catalog`.`default`.`viewtest`, [a#x, b#x])
+- Project [cast(a#x as int) AS a#x, cast(b#x as int) AS b#x]
+- Sort [b#x DESC NULLS LAST], true
+- Project [a#x, b#x]
@@ -937,7 +937,7 @@ SELECT * FROM tt1
-- !query analysis
Project [a#x, b#x, c#x, d#x]
+- SubqueryAlias spark_catalog.testviewschm2.tt1
- +- View (`spark_catalog`.`testviewschm2`.`tt1`, [a#x,b#x,c#x,d#x])
+ +- View (`spark_catalog`.`testviewschm2`.`tt1`, [a#x, b#x, c#x, d#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as string) AS b#x, cast(c#x as decimal(12,2)) AS c#x, cast(d#x as string) AS d#x]
+- Project [a#x, b#x, c#x, d#x]
+- SubqueryAlias vv
@@ -950,7 +950,7 @@ SELECT string(a) FROM tt1
-- !query analysis
Project [cast(a#x as string) AS a#x]
+- SubqueryAlias spark_catalog.testviewschm2.tt1
- +- View (`spark_catalog`.`testviewschm2`.`tt1`, [a#x,b#x,c#x,d#x])
+ +- View (`spark_catalog`.`testviewschm2`.`tt1`, [a#x, b#x, c#x, d#x])
+- Project [cast(a#x as string) AS a#x, cast(b#x as string) AS b#x, cast(c#x as decimal(12,2)) AS c#x, cast(d#x as string) AS d#x]
+- Project [a#x, b#x, c#x, d#x]
+- SubqueryAlias vv
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/groupingsets.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/groupingsets.sql.out
index d8b7be296ffd..173a324dc456 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/groupingsets.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/groupingsets.sql.out
@@ -86,7 +86,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, cast((shiftright(spark_gr
+- Expand [[a#x, b#x, v#x, a#x, b#x, 0], [a#x, b#x, v#x, a#x, null, 1], [a#x, b#x, v#x, null, null, 3]], [a#x, b#x, v#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, v#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias gstest1
- +- View (`gstest1`, [a#x,b#x,v#x])
+ +- View (`gstest1`, [a#x, b#x, v#x])
+- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
+- LocalRelation [col1#x, col2#x, col3#x]
@@ -100,7 +100,7 @@ Sort [a#x ASC NULLS FIRST, b#x ASC NULLS FIRST], true
+- Expand [[a#x, b#x, v#x, a#x, b#x, 0], [a#x, b#x, v#x, a#x, null, 1], [a#x, b#x, v#x, null, null, 3]], [a#x, b#x, v#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, v#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias gstest1
- +- View (`gstest1`, [a#x,b#x,v#x])
+ +- View (`gstest1`, [a#x, b#x, v#x])
+- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
+- LocalRelation [col1#x, col2#x, col3#x]
@@ -114,7 +114,7 @@ Sort [b#x DESC NULLS LAST, a#x ASC NULLS FIRST], true
+- Expand [[a#x, b#x, v#x, a#x, b#x, 0], [a#x, b#x, v#x, a#x, null, 1], [a#x, b#x, v#x, null, null, 3]], [a#x, b#x, v#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, v#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias gstest1
- +- View (`gstest1`, [a#x,b#x,v#x])
+ +- View (`gstest1`, [a#x, b#x, v#x])
+- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
+- LocalRelation [col1#x, col2#x, col3#x]
@@ -128,7 +128,7 @@ Sort [(coalesce(a#x, 0) + coalesce(b#x, 0)) ASC NULLS FIRST, a#x ASC NULLS FIRST
+- Expand [[a#x, b#x, v#x, a#x, b#x, 0], [a#x, b#x, v#x, a#x, null, 1], [a#x, b#x, v#x, null, null, 3]], [a#x, b#x, v#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, v#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias gstest1
- +- View (`gstest1`, [a#x,b#x,v#x])
+ +- View (`gstest1`, [a#x, b#x, v#x])
+- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
+- LocalRelation [col1#x, col2#x, col3#x]
@@ -215,7 +215,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, cast((shiftright(spark_gr
+- Join Inner
:- SubqueryAlias t1
: +- SubqueryAlias gstest1
- : +- View (`gstest1`, [a#x,b#x,v#x])
+ : +- View (`gstest1`, [a#x, b#x, v#x])
: +- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
: +- LocalRelation [col1#x, col2#x, col3#x]
+- SubqueryAlias t2
@@ -234,7 +234,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, cast((shiftright(spark_gr
+- Join Inner, (a#x = a#x)
:- SubqueryAlias t1
: +- SubqueryAlias gstest1
- : +- View (`gstest1`, [a#x,b#x,v#x])
+ : +- View (`gstest1`, [a#x, b#x, v#x])
: +- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
: +- LocalRelation [col1#x, col2#x, col3#x]
+- SubqueryAlias t2
@@ -254,7 +254,7 @@ Aggregate [a#x, b#x, spark_grouping_id#xL], [a#x, b#x, cast((shiftright(spark_gr
+- Join Inner, ((a#x = a#x) AND (b#x = b#x))
:- SubqueryAlias t1
: +- SubqueryAlias gstest1
- : +- View (`gstest1`, [a#x,b#x,v#x])
+ : +- View (`gstest1`, [a#x, b#x, v#x])
: +- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
: +- LocalRelation [col1#x, col2#x, col3#x]
+- SubqueryAlias t2
@@ -340,7 +340,7 @@ Sort [x#x ASC NULLS FIRST, q2#xL ASC NULLS FIRST], true
+- Project [q1#xL, q2#xL, (q1#xL = cast(1 as bigint)) AS x#x]
+- SubqueryAlias i1
+- SubqueryAlias int8_tbl
- +- View (`int8_tbl`, [q1#xL,q2#xL])
+ +- View (`int8_tbl`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias int8_tbl
@@ -486,7 +486,7 @@ Sort [grouping(a)#x ASC NULLS FIRST, grouping(b)#x ASC NULLS FIRST, a#x ASC NULL
+- Expand [[a#x, b#x, v#x, a#x, null, 1], [a#x, b#x, v#x, null, b#x, 2]], [a#x, b#x, v#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, v#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias gstest1
- +- View (`gstest1`, [a#x,b#x,v#x])
+ +- View (`gstest1`, [a#x, b#x, v#x])
+- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
+- LocalRelation [col1#x, col2#x, col3#x]
@@ -500,7 +500,7 @@ Sort [grouping(a)#x ASC NULLS FIRST, grouping(b)#x ASC NULLS FIRST, a#x ASC NULL
+- Expand [[a#x, b#x, v#x, a#x, b#x, 0], [a#x, b#x, v#x, a#x, null, 1], [a#x, b#x, v#x, null, b#x, 2], [a#x, b#x, v#x, null, null, 3]], [a#x, b#x, v#x, a#x, b#x, spark_grouping_id#xL]
+- Project [a#x, b#x, v#x, a#x AS a#x, b#x AS b#x]
+- SubqueryAlias gstest1
- +- View (`gstest1`, [a#x,b#x,v#x])
+ +- View (`gstest1`, [a#x, b#x, v#x])
+- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
+- LocalRelation [col1#x, col2#x, col3#x]
@@ -597,7 +597,7 @@ Sort [grouping(a)#x ASC NULLS FIRST, grouping(b)#x ASC NULLS FIRST, max(v)#x ASC
+- Expand [[a#x, b#x, v#x, a#x, b#x, null, null, null, null, 15], [a#x, b#x, v#x, null, null, (a#x + 1)#x, (b#x + 1)#x, null, null, 51], [a#x, b#x, v#x, null, null, null, null, (a#x + 2)#x, (b#x + 2)#x, 60]], [a#x, b#x, v#x, a#x, b#x, (a#x + 1)#x, (b#x + 1)#x, (a#x + 2)#x, (b#x + 2)#x, spark_grouping_id#xL]
+- Project [a#x, b#x, v#x, a#x AS a#x, b#x AS b#x, (a#x + 1) AS (a#x + 1)#x, (b#x + 1) AS (b#x + 1)#x, (a#x + 2) AS (a#x + 2)#x, (b#x + 2) AS (b#x + 2)#x]
+- SubqueryAlias gstest1
- +- View (`gstest1`, [a#x,b#x,v#x])
+ +- View (`gstest1`, [a#x, b#x, v#x])
+- Project [cast(col1#x as int) AS a#x, cast(col2#x as int) AS b#x, cast(col3#x as int) AS v#x]
+- LocalRelation [col1#x, col2#x, col3#x]
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/join.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/join.sql.out
index c66326e020eb..0147e84cb5a9 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/join.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/join.sql.out
@@ -1027,7 +1027,7 @@ select * from x
-- !query analysis
Project [x1#x, x2#x]
+- SubqueryAlias x
- +- View (`x`, [x1#x,x2#x])
+ +- View (`x`, [x1#x, x2#x])
+- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
+- Project [x1#x, x2#x]
+- SubqueryAlias v
@@ -1040,7 +1040,7 @@ select * from y
-- !query analysis
Project [y1#x, y2#x]
+- SubqueryAlias y
- +- View (`y`, [y1#x,y2#x])
+ +- View (`y`, [y1#x, y2#x])
+- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
+- Project [y1#x, y2#x]
+- SubqueryAlias v
@@ -1054,14 +1054,14 @@ select * from x left join y on (x1 = y1 and x2 is not null)
Project [x1#x, x2#x, y1#x, y2#x]
+- Join LeftOuter, ((x1#x = y1#x) AND isnotnull(x2#x))
:- SubqueryAlias x
- : +- View (`x`, [x1#x,x2#x])
+ : +- View (`x`, [x1#x, x2#x])
: +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: +- Project [x1#x, x2#x]
: +- SubqueryAlias v
: +- Project [col1#x AS x1#x, col2#x AS x2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias y
- +- View (`y`, [y1#x,y2#x])
+ +- View (`y`, [y1#x, y2#x])
+- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
+- Project [y1#x, y2#x]
+- SubqueryAlias v
@@ -1075,14 +1075,14 @@ select * from x left join y on (x1 = y1 and y2 is not null)
Project [x1#x, x2#x, y1#x, y2#x]
+- Join LeftOuter, ((x1#x = y1#x) AND isnotnull(y2#x))
:- SubqueryAlias x
- : +- View (`x`, [x1#x,x2#x])
+ : +- View (`x`, [x1#x, x2#x])
: +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: +- Project [x1#x, x2#x]
: +- SubqueryAlias v
: +- Project [col1#x AS x1#x, col2#x AS x2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias y
- +- View (`y`, [y1#x,y2#x])
+ +- View (`y`, [y1#x, y2#x])
+- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
+- Project [y1#x, y2#x]
+- SubqueryAlias v
@@ -1098,14 +1098,14 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- Join LeftOuter, (x1#x = xx1#x)
:- Join LeftOuter, (x1#x = y1#x)
: :- SubqueryAlias x
- : : +- View (`x`, [x1#x,x2#x])
+ : : +- View (`x`, [x1#x, x2#x])
: : +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: : +- Project [x1#x, x2#x]
: : +- SubqueryAlias v
: : +- Project [col1#x AS x1#x, col2#x AS x2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias y
- : +- View (`y`, [y1#x,y2#x])
+ : +- View (`y`, [y1#x, y2#x])
: +- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
: +- Project [y1#x, y2#x]
: +- SubqueryAlias v
@@ -1114,7 +1114,7 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- SubqueryAlias xx
+- Project [x1#x AS xx1#x, x2#x AS xx2#x]
+- SubqueryAlias x
- +- View (`x`, [x1#x,x2#x])
+ +- View (`x`, [x1#x, x2#x])
+- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
+- Project [x1#x, x2#x]
+- SubqueryAlias v
@@ -1130,14 +1130,14 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- Join LeftOuter, ((x1#x = xx1#x) AND isnotnull(x2#x))
:- Join LeftOuter, (x1#x = y1#x)
: :- SubqueryAlias x
- : : +- View (`x`, [x1#x,x2#x])
+ : : +- View (`x`, [x1#x, x2#x])
: : +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: : +- Project [x1#x, x2#x]
: : +- SubqueryAlias v
: : +- Project [col1#x AS x1#x, col2#x AS x2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias y
- : +- View (`y`, [y1#x,y2#x])
+ : +- View (`y`, [y1#x, y2#x])
: +- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
: +- Project [y1#x, y2#x]
: +- SubqueryAlias v
@@ -1146,7 +1146,7 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- SubqueryAlias xx
+- Project [x1#x AS xx1#x, x2#x AS xx2#x]
+- SubqueryAlias x
- +- View (`x`, [x1#x,x2#x])
+ +- View (`x`, [x1#x, x2#x])
+- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
+- Project [x1#x, x2#x]
+- SubqueryAlias v
@@ -1162,14 +1162,14 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- Join LeftOuter, ((x1#x = xx1#x) AND isnotnull(y2#x))
:- Join LeftOuter, (x1#x = y1#x)
: :- SubqueryAlias x
- : : +- View (`x`, [x1#x,x2#x])
+ : : +- View (`x`, [x1#x, x2#x])
: : +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: : +- Project [x1#x, x2#x]
: : +- SubqueryAlias v
: : +- Project [col1#x AS x1#x, col2#x AS x2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias y
- : +- View (`y`, [y1#x,y2#x])
+ : +- View (`y`, [y1#x, y2#x])
: +- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
: +- Project [y1#x, y2#x]
: +- SubqueryAlias v
@@ -1178,7 +1178,7 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- SubqueryAlias xx
+- Project [x1#x AS xx1#x, x2#x AS xx2#x]
+- SubqueryAlias x
- +- View (`x`, [x1#x,x2#x])
+ +- View (`x`, [x1#x, x2#x])
+- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
+- Project [x1#x, x2#x]
+- SubqueryAlias v
@@ -1194,14 +1194,14 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- Join LeftOuter, ((x1#x = xx1#x) AND isnotnull(xx2#x))
:- Join LeftOuter, (x1#x = y1#x)
: :- SubqueryAlias x
- : : +- View (`x`, [x1#x,x2#x])
+ : : +- View (`x`, [x1#x, x2#x])
: : +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: : +- Project [x1#x, x2#x]
: : +- SubqueryAlias v
: : +- Project [col1#x AS x1#x, col2#x AS x2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias y
- : +- View (`y`, [y1#x,y2#x])
+ : +- View (`y`, [y1#x, y2#x])
: +- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
: +- Project [y1#x, y2#x]
: +- SubqueryAlias v
@@ -1210,7 +1210,7 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- SubqueryAlias xx
+- Project [x1#x AS xx1#x, x2#x AS xx2#x]
+- SubqueryAlias x
- +- View (`x`, [x1#x,x2#x])
+ +- View (`x`, [x1#x, x2#x])
+- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
+- Project [x1#x, x2#x]
+- SubqueryAlias v
@@ -1227,14 +1227,14 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- Join LeftOuter, (x1#x = xx1#x)
:- Join LeftOuter, (x1#x = y1#x)
: :- SubqueryAlias x
- : : +- View (`x`, [x1#x,x2#x])
+ : : +- View (`x`, [x1#x, x2#x])
: : +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: : +- Project [x1#x, x2#x]
: : +- SubqueryAlias v
: : +- Project [col1#x AS x1#x, col2#x AS x2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias y
- : +- View (`y`, [y1#x,y2#x])
+ : +- View (`y`, [y1#x, y2#x])
: +- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
: +- Project [y1#x, y2#x]
: +- SubqueryAlias v
@@ -1243,7 +1243,7 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- SubqueryAlias xx
+- Project [x1#x AS xx1#x, x2#x AS xx2#x]
+- SubqueryAlias x
- +- View (`x`, [x1#x,x2#x])
+ +- View (`x`, [x1#x, x2#x])
+- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
+- Project [x1#x, x2#x]
+- SubqueryAlias v
@@ -1260,14 +1260,14 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- Join LeftOuter, (x1#x = xx1#x)
:- Join LeftOuter, (x1#x = y1#x)
: :- SubqueryAlias x
- : : +- View (`x`, [x1#x,x2#x])
+ : : +- View (`x`, [x1#x, x2#x])
: : +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: : +- Project [x1#x, x2#x]
: : +- SubqueryAlias v
: : +- Project [col1#x AS x1#x, col2#x AS x2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias y
- : +- View (`y`, [y1#x,y2#x])
+ : +- View (`y`, [y1#x, y2#x])
: +- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
: +- Project [y1#x, y2#x]
: +- SubqueryAlias v
@@ -1276,7 +1276,7 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- SubqueryAlias xx
+- Project [x1#x AS xx1#x, x2#x AS xx2#x]
+- SubqueryAlias x
- +- View (`x`, [x1#x,x2#x])
+ +- View (`x`, [x1#x, x2#x])
+- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
+- Project [x1#x, x2#x]
+- SubqueryAlias v
@@ -1293,14 +1293,14 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- Join LeftOuter, (x1#x = xx1#x)
:- Join LeftOuter, (x1#x = y1#x)
: :- SubqueryAlias x
- : : +- View (`x`, [x1#x,x2#x])
+ : : +- View (`x`, [x1#x, x2#x])
: : +- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
: : +- Project [x1#x, x2#x]
: : +- SubqueryAlias v
: : +- Project [col1#x AS x1#x, col2#x AS x2#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias y
- : +- View (`y`, [y1#x,y2#x])
+ : +- View (`y`, [y1#x, y2#x])
: +- Project [cast(y1#x as int) AS y1#x, cast(y2#x as int) AS y2#x]
: +- Project [y1#x, y2#x]
: +- SubqueryAlias v
@@ -1309,7 +1309,7 @@ Project [x1#x, x2#x, y1#x, y2#x, xx1#x, xx2#x]
+- SubqueryAlias xx
+- Project [x1#x AS xx1#x, x2#x AS xx2#x]
+- SubqueryAlias x
- +- View (`x`, [x1#x,x2#x])
+ +- View (`x`, [x1#x, x2#x])
+- Project [cast(x1#x as int) AS x1#x, cast(x2#x as int) AS x2#x]
+- Project [x1#x, x2#x]
+- SubqueryAlias v
@@ -1451,7 +1451,7 @@ Sort [q1#xL ASC NULLS FIRST, q2#xL ASC NULLS FIRST], true
+- Join LeftOuter, (q2#xL = q2#xL)
:- SubqueryAlias i1
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -1460,7 +1460,7 @@ Sort [q1#xL ASC NULLS FIRST, q2#xL ASC NULLS FIRST], true
+- Join Inner, (q1#xL = cast(x#x as bigint))
:- SubqueryAlias i2
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -1652,14 +1652,14 @@ select tt1.*, tt2.* from tt1 left join tt2 on tt1.joincol = tt2.joincol
Project [tt1_id#x, joincol#x, tt2_id#x, joincol#x]
+- Join LeftOuter, (joincol#x = joincol#x)
:- SubqueryAlias tt1
- : +- View (`tt1`, [tt1_id#x,joincol#x])
+ : +- View (`tt1`, [tt1_id#x, joincol#x])
: +- Project [cast(tt1_id#x as int) AS tt1_id#x, cast(joincol#x as int) AS joincol#x]
: +- Project [tt1_id#x, joincol#x]
: +- SubqueryAlias v
: +- Project [col1#x AS tt1_id#x, col2#x AS joincol#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias tt2
- +- View (`tt2`, [tt2_id#x,joincol#x])
+ +- View (`tt2`, [tt2_id#x, joincol#x])
+- Project [cast(tt2_id#x as int) AS tt2_id#x, cast(joincol#x as int) AS joincol#x]
+- Project [tt2_id#x, joincol#x]
+- SubqueryAlias v
@@ -1673,14 +1673,14 @@ select tt1.*, tt2.* from tt2 right join tt1 on tt1.joincol = tt2.joincol
Project [tt1_id#x, joincol#x, tt2_id#x, joincol#x]
+- Join RightOuter, (joincol#x = joincol#x)
:- SubqueryAlias tt2
- : +- View (`tt2`, [tt2_id#x,joincol#x])
+ : +- View (`tt2`, [tt2_id#x, joincol#x])
: +- Project [cast(tt2_id#x as int) AS tt2_id#x, cast(joincol#x as int) AS joincol#x]
: +- Project [tt2_id#x, joincol#x]
: +- SubqueryAlias v
: +- Project [col1#x AS tt2_id#x, col2#x AS joincol#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias tt1
- +- View (`tt1`, [tt1_id#x,joincol#x])
+ +- View (`tt1`, [tt1_id#x, joincol#x])
+- Project [cast(tt1_id#x as int) AS tt1_id#x, cast(joincol#x as int) AS joincol#x]
+- Project [tt1_id#x, joincol#x]
+- SubqueryAlias v
@@ -1760,7 +1760,7 @@ Project [f1#x]
+- Join LeftOuter, (f1#x = f1#x)
:- SubqueryAlias b
: +- SubqueryAlias tt3
- : +- View (`tt3`, [f1#x,f2#x])
+ : +- View (`tt3`, [f1#x, f2#x])
: +- Project [cast(f1#x as int) AS f1#x, cast(f2#x as string) AS f2#x]
: +- Project [f1#x, f2#x]
: +- SubqueryAlias v
@@ -1770,7 +1770,7 @@ Project [f1#x]
: +- Range (1, 10001, step=1, splits=None)
+- SubqueryAlias c
+- SubqueryAlias tt3
- +- View (`tt3`, [f1#x,f2#x])
+ +- View (`tt3`, [f1#x, f2#x])
+- Project [cast(f1#x as int) AS f1#x, cast(f2#x as string) AS f2#x]
+- Project [f1#x, f2#x]
+- SubqueryAlias v
@@ -1815,14 +1815,14 @@ Project [f1#x, f2#x, f1#x, f2#x]
+- Filter ((f1#x = f1#x) AND (f1#x = (f2#x - f2#x)))
+- Join Inner
:- SubqueryAlias tt5
- : +- View (`tt5`, [f1#x,f2#x])
+ : +- View (`tt5`, [f1#x, f2#x])
: +- Project [cast(f1#x as int) AS f1#x, cast(f2#x as int) AS f2#x]
: +- Project [f1#x, f2#x]
: +- SubqueryAlias v
: +- Project [col1#x AS f1#x, col2#x AS f2#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias tt6
- +- View (`tt6`, [f1#x,f2#x])
+ +- View (`tt6`, [f1#x, f2#x])
+- Project [cast(f1#x as int) AS f1#x, cast(f2#x as int) AS f2#x]
+- Project [f1#x, f2#x]
+- SubqueryAlias v
@@ -1871,7 +1871,7 @@ Project [pkyy#x AS yy_pkyy#x, pkxx#x AS yy_pkxx#x, pkyy#x AS yya_pkyy#x, pkxx#x
:- Join LeftOuter, (pkxx#x = pkxx#x)
: :- Join LeftOuter, (pkyy#x = pkyy#x)
: : :- SubqueryAlias yy
- : : : +- View (`yy`, [pkyy#x,pkxx#x])
+ : : : +- View (`yy`, [pkyy#x, pkxx#x])
: : : +- Project [cast(pkyy#x as int) AS pkyy#x, cast(pkxx#x as int) AS pkxx#x]
: : : +- Project [pkyy#x, pkxx#x]
: : : +- SubqueryAlias v
@@ -1881,7 +1881,7 @@ Project [pkyy#x AS yy_pkyy#x, pkxx#x AS yy_pkxx#x, pkyy#x AS yya_pkyy#x, pkxx#x
: : +- Project [pkyy#x, pkxx#x]
: : +- Filter (pkyy#x = 101)
: : +- SubqueryAlias yy
- : : +- View (`yy`, [pkyy#x,pkxx#x])
+ : : +- View (`yy`, [pkyy#x, pkxx#x])
: : +- Project [cast(pkyy#x as int) AS pkyy#x, cast(pkxx#x as int) AS pkxx#x]
: : +- Project [pkyy#x, pkxx#x]
: : +- SubqueryAlias v
@@ -2003,7 +2003,7 @@ Project [f2#x, f3#x, f1#x, junk#x]
: +- View (`zt3`, [f3#x])
: +- Relation [f3#x] parquet
+- SubqueryAlias zv1
- +- View (`zv1`, [f1#x,junk#x])
+ +- View (`zv1`, [f1#x, junk#x])
+- Project [cast(f1#x as int) AS f1#x, cast(junk#x as string) AS junk#x]
+- Project [f1#x, dummy AS junk#x]
+- SubqueryAlias zt1
@@ -2053,7 +2053,7 @@ Project [i#x, x#x, y#x]
: +- View (`a`, [i#x])
: +- Relation [i#x] parquet
+- SubqueryAlias b
- +- View (`b`, [x#x,y#x])
+ +- View (`b`, [x#x, y#x])
+- Relation [x#x,y#x] parquet
@@ -2067,7 +2067,7 @@ Sort [q2#xL ASC NULLS FIRST], true
+- Join LeftOuter, (q2#xL = q1#xL)
:- SubqueryAlias t1
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -2075,7 +2075,7 @@ Sort [q2#xL ASC NULLS FIRST], true
: +- LocalRelation [col1#xL, col2#xL]
+- SubqueryAlias t2
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -2093,7 +2093,7 @@ Sort [q2#xL ASC NULLS FIRST], true
+- Join LeftOuter, (q2#xL = q1#xL)
:- SubqueryAlias t1
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -2102,7 +2102,7 @@ Sort [q2#xL ASC NULLS FIRST], true
+- SubqueryAlias t2
+- Project [q1#xL, q2#xL]
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -2122,7 +2122,7 @@ Sort [q2#xL ASC NULLS FIRST], true
+- Join LeftOuter, (q2#xL = q1#xL)
:- SubqueryAlias t1
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -2131,7 +2131,7 @@ Sort [q2#xL ASC NULLS FIRST], true
+- SubqueryAlias t2
+- Project [q1#xL, CASE WHEN (q2#xL = cast(1 as bigint)) THEN cast(1 as bigint) ELSE q2#xL END AS q2#xL]
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -2196,7 +2196,7 @@ Sort [name#x ASC NULLS FIRST], true
+- Project [name#x, code#x, b_cnt#xL, const#x]
+- Join LeftOuter, (a#x = code#x)
:- SubqueryAlias c
- : +- View (`c`, [name#x,a#x])
+ : +- View (`c`, [name#x, a#x])
: +- Project [cast(name#x as string) AS name#x, cast(a#x as string) AS a#x]
: +- Project [name#x, a#x]
: +- SubqueryAlias v
@@ -2215,7 +2215,7 @@ Sort [name#x ASC NULLS FIRST], true
+- SubqueryAlias b_grp
+- Aggregate [a#x], [count(1) AS cnt#xL, a#x]
+- SubqueryAlias b
- +- View (`b`, [a#x,num#x])
+ +- View (`b`, [a#x, num#x])
+- Project [cast(a#x as string) AS a#x, cast(num#x as int) AS num#x]
+- Project [a#x, num#x]
+- SubqueryAlias v
@@ -2318,7 +2318,7 @@ Project [qq#xL, unique1#x]
: : +- Project [coalesce(q1#xL, cast(0 as bigint)) AS qq#xL]
: : +- SubqueryAlias a
: : +- SubqueryAlias int8_tbl
- : : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: : +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: : +- Project [q1#xL, q2#xL]
: : +- SubqueryAlias v
@@ -2328,7 +2328,7 @@ Project [qq#xL, unique1#x]
: +- Project [coalesce(q2#xL, cast(-1 as bigint)) AS qq#xL]
: +- SubqueryAlias b
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -2399,7 +2399,7 @@ Project [id#x]
+- Join LeftOuter, (id#x = nt2_id#x)
:- SubqueryAlias nt3
: +- SubqueryAlias nt3
- : +- View (`nt3`, [id#x,nt2_id#x,c1#x])
+ : +- View (`nt3`, [id#x, nt2_id#x, c1#x])
: +- Project [cast(id#x as int) AS id#x, cast(nt2_id#x as int) AS nt2_id#x, cast(c1#x as boolean) AS c1#x]
: +- Project [id#x, nt2_id#x, c1#x]
: +- SubqueryAlias v
@@ -2410,7 +2410,7 @@ Project [id#x]
+- Join LeftOuter, (id#x = nt1_id#x)
:- SubqueryAlias nt2
: +- SubqueryAlias nt2
- : +- View (`nt2`, [id#x,nt1_id#x,b1#x,b2#x])
+ : +- View (`nt2`, [id#x, nt1_id#x, b1#x, b2#x])
: +- Project [cast(id#x as int) AS id#x, cast(nt1_id#x as int) AS nt1_id#x, cast(b1#x as boolean) AS b1#x, cast(b2#x as boolean) AS b2#x]
: +- Project [id#x, nt1_id#x, b1#x, b2#x]
: +- SubqueryAlias v
@@ -2419,7 +2419,7 @@ Project [id#x]
+- SubqueryAlias ss1
+- Project [id#x, a1#x, a2#x, isnotnull(id#x) AS a3#x]
+- SubqueryAlias nt1
- +- View (`nt1`, [id#x,a1#x,a2#x])
+ +- View (`nt1`, [id#x, a1#x, a2#x])
+- Project [cast(id#x as int) AS id#x, cast(a1#x as boolean) AS a1#x, cast(a2#x as boolean) AS a2#x]
+- Project [id#x, a1#x, a2#x]
+- SubqueryAlias v
@@ -2558,7 +2558,7 @@ Sort [fault#xL ASC NULLS FIRST], true
+- Project [unique1#x, q1#xL, (cast(coalesce(unique1#x, -1) as bigint) + q1#xL) AS fault#xL]
+- Join LeftOuter, (q2#xL = cast(unique2#x as bigint))
:- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -2578,7 +2578,7 @@ Project [q1#xL, unique2#x, thousand#x, hundred#x]
+- Join LeftOuter, (q1#xL = cast(unique2#x as bigint))
:- SubqueryAlias a
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -2654,7 +2654,7 @@ Project [f1#x, q1#xL, q2#xL, f1#x, f1#x]
: : : +- LocalRelation [col1#x]
: : +- SubqueryAlias i8
: : +- SubqueryAlias int8_tbl
- : : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: : +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: : +- Project [q1#xL, q2#xL]
: : +- SubqueryAlias v
@@ -2712,7 +2712,7 @@ Project [f1#x, q1#xL, q2#xL, q1#xL, f1#x]
: +- LocalRelation [col1#x]
+- SubqueryAlias i8
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -2754,7 +2754,7 @@ Project [f1#x, q1#xL, q2#xL, q1#xL, f1#x]
: +- LocalRelation [col1#x]
+- SubqueryAlias i8
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -2810,7 +2810,7 @@ Project [f1#x, q1#xL, q2#xL, q1#xL, f1#x, q1#xL, f1#x]
: +- LocalRelation [col1#x]
+- SubqueryAlias i8
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -2866,7 +2866,7 @@ Project [f1#x, q1#xL, q2#xL, q1#xL, f1#x, q1#xL, f1#x]
: +- LocalRelation [col1#x]
+- SubqueryAlias i8
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -3027,7 +3027,7 @@ Project [q2#xL, q1#xL]
+- Join LeftOuter, (q2#xL = coalesce(q1#xL, cast(1 as bigint)))
:- SubqueryAlias a
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -3035,7 +3035,7 @@ Project [q2#xL, q1#xL]
: +- LocalRelation [col1#xL, col2#xL]
+- SubqueryAlias b
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -3078,7 +3078,7 @@ Project [k#x, pd#x]
+- Join LeftOuter, (k#x = k#x)
:- SubqueryAlias p
: +- SubqueryAlias parent
- : +- View (`parent`, [k#x,pd#x])
+ : +- View (`parent`, [k#x, pd#x])
: +- Project [cast(k#x as int) AS k#x, cast(pd#x as int) AS pd#x]
: +- Project [k#x, pd#x]
: +- SubqueryAlias v
@@ -3086,7 +3086,7 @@ Project [k#x, pd#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias c
+- SubqueryAlias child
- +- View (`child`, [k#x,cd#x])
+ +- View (`child`, [k#x, cd#x])
+- Project [cast(k#x as int) AS k#x, cast(cd#x as int) AS cd#x]
+- Project [k#x, cd#x]
+- SubqueryAlias v
@@ -3103,7 +3103,7 @@ Project [k#x, pd#x, linked#x]
+- Join LeftOuter, (k#x = k#x)
:- SubqueryAlias p
: +- SubqueryAlias parent
- : +- View (`parent`, [k#x,pd#x])
+ : +- View (`parent`, [k#x, pd#x])
: +- Project [cast(k#x as int) AS k#x, cast(pd#x as int) AS pd#x]
: +- Project [k#x, pd#x]
: +- SubqueryAlias v
@@ -3113,7 +3113,7 @@ Project [k#x, pd#x, linked#x]
+- Project [k#x, cd#x, true AS linked#x]
+- SubqueryAlias c
+- SubqueryAlias child
- +- View (`child`, [k#x,cd#x])
+ +- View (`child`, [k#x, cd#x])
+- Project [cast(k#x as int) AS k#x, cast(cd#x as int) AS cd#x]
+- Project [k#x, cd#x]
+- SubqueryAlias v
@@ -3131,7 +3131,7 @@ Project [k#x, pd#x]
+- Join LeftOuter, (k#x = k#x)
:- SubqueryAlias p
: +- SubqueryAlias parent
- : +- View (`parent`, [k#x,pd#x])
+ : +- View (`parent`, [k#x, pd#x])
: +- Project [cast(k#x as int) AS k#x, cast(pd#x as int) AS pd#x]
: +- Project [k#x, pd#x]
: +- SubqueryAlias v
@@ -3139,7 +3139,7 @@ Project [k#x, pd#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias c
+- SubqueryAlias child
- +- View (`child`, [k#x,cd#x])
+ +- View (`child`, [k#x, cd#x])
+- Project [cast(k#x as int) AS k#x, cast(cd#x as int) AS cd#x]
+- Project [k#x, cd#x]
+- SubqueryAlias v
@@ -3158,7 +3158,7 @@ Project [k#x, pd#x]
:- Join LeftOuter, (k#x = k#x)
: :- SubqueryAlias p
: : +- SubqueryAlias parent
- : : +- View (`parent`, [k#x,pd#x])
+ : : +- View (`parent`, [k#x, pd#x])
: : +- Project [cast(k#x as int) AS k#x, cast(pd#x as int) AS pd#x]
: : +- Project [k#x, pd#x]
: : +- SubqueryAlias v
@@ -3166,7 +3166,7 @@ Project [k#x, pd#x]
: : +- LocalRelation [col1#x, col2#x]
: +- SubqueryAlias c
: +- SubqueryAlias child
- : +- View (`child`, [k#x,cd#x])
+ : +- View (`child`, [k#x, cd#x])
: +- Project [cast(k#x as int) AS k#x, cast(cd#x as int) AS cd#x]
: +- Project [k#x, cd#x]
: +- SubqueryAlias v
@@ -3174,7 +3174,7 @@ Project [k#x, pd#x]
: +- LocalRelation [col1#x, col2#x]
+- SubqueryAlias x
+- SubqueryAlias parent
- +- View (`parent`, [k#x,pd#x])
+ +- View (`parent`, [k#x, pd#x])
+- Project [cast(k#x as int) AS k#x, cast(pd#x as int) AS pd#x]
+- Project [k#x, pd#x]
+- SubqueryAlias v
@@ -3217,7 +3217,7 @@ Project [id#x, a_id#x, id#x]
+- Filter (isnull(id#x) OR (id#x > 0))
+- Join LeftOuter, (a_id#x = id#x)
:- SubqueryAlias b
- : +- View (`b`, [id#x,a_id#x])
+ : +- View (`b`, [id#x, a_id#x])
: +- Project [cast(id#x as int) AS id#x, cast(a_id#x as int) AS a_id#x]
: +- Project [id#x, a_id#x]
: +- SubqueryAlias v
@@ -3239,7 +3239,7 @@ Project [id#x, a_id#x]
+- Filter (isnull(id#x) OR (id#x > 0))
+- Join LeftOuter, (a_id#x = id#x)
:- SubqueryAlias b
- : +- View (`b`, [id#x,a_id#x])
+ : +- View (`b`, [id#x, a_id#x])
: +- Project [cast(id#x as int) AS id#x, cast(a_id#x as int) AS a_id#x]
: +- Project [id#x, a_id#x]
: +- SubqueryAlias v
@@ -3285,14 +3285,14 @@ Project [x#x, q1#xL, q2#xL, y#xL]
+- Project [q1#xL, q2#xL, coalesce(dat1#xL, q1#xL) AS y#xL]
+- Join LeftOuter, (q2#xL = id#xL)
:- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
: +- Project [col1#xL AS q1#xL, col2#xL AS q2#xL]
: +- LocalRelation [col1#xL, col2#xL]
+- SubqueryAlias innertab
- +- View (`innertab`, [id#xL,dat1#xL])
+ +- View (`innertab`, [id#xL, dat1#xL])
+- Project [cast(id#xL as bigint) AS id#xL, cast(dat1#xL as bigint) AS dat1#xL]
+- Project [id#xL, dat1#xL]
+- SubqueryAlias v
@@ -3352,7 +3352,7 @@ Project [q1#xL, q2#xL, f1#x, ff#x]
+- Join Inner, (q1#xL = cast(f1#x as bigint))
:- SubqueryAlias x
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -3584,7 +3584,7 @@ Project [q1#xL, q2#xL, q1#xL, q2#xL, xq1#xL, yq1#xL, yq2#xL]
+- Join LeftOuter, (q2#xL = q1#xL)
:- SubqueryAlias x
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -3593,7 +3593,7 @@ Project [q1#xL, q2#xL, q1#xL, q2#xL, xq1#xL, yq1#xL, yq2#xL]
+- SubqueryAlias y
+- Project [q1#xL, coalesce(q2#xL, cast(0 as bigint)) AS q2#xL]
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -3615,7 +3615,7 @@ Project [q1#xL, q2#xL]
+- Join LeftOuter, (q2#xL = q1#xL)
:- SubqueryAlias x
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -3624,7 +3624,7 @@ Project [q1#xL, q2#xL]
+- SubqueryAlias y
+- Project [q1#xL, coalesce(q2#xL, cast(0 as bigint)) AS q2#xL]
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -3643,7 +3643,7 @@ Project [q1#xL, q2#xL, q1#xL, q2#xL, x#xL]
: +- Project [q1#xL, q2#xL, outer(q2#xL) AS x#xL]
: +- SubqueryAlias b
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -3651,7 +3651,7 @@ Project [q1#xL, q2#xL, q1#xL, q2#xL, x#xL]
: +- LocalRelation [col1#xL, col2#xL]
+- SubqueryAlias a
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -3670,7 +3670,7 @@ Project [q1#xL, q2#xL, q1#xL, q2#xL, x#xL]
: +- Project [q1#xL, q2#xL, coalesce(outer(q2#xL), cast(42 as bigint)) AS x#xL]
: +- SubqueryAlias b
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -3678,7 +3678,7 @@ Project [q1#xL, q2#xL, q1#xL, q2#xL, x#xL]
: +- LocalRelation [col1#xL, col2#xL]
+- SubqueryAlias a
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
@@ -3724,7 +3724,7 @@ Project [q1#xL, q2#xL, bq1#xL, cq1#xL, least(outer(a.q1), q1, q1)#xL]
: +- Join Cross
: :- SubqueryAlias b
: : +- SubqueryAlias int8_tbl
- : : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: : +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: : +- Project [q1#xL, q2#xL]
: : +- SubqueryAlias v
@@ -3732,7 +3732,7 @@ Project [q1#xL, q2#xL, bq1#xL, cq1#xL, least(outer(a.q1), q1, q1)#xL]
: : +- LocalRelation [col1#xL, col2#xL]
: +- SubqueryAlias c
: +- SubqueryAlias int8_tbl
- : +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ : +- View (`INT8_TBL`, [q1#xL, q2#xL])
: +- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
: +- Project [q1#xL, q2#xL]
: +- SubqueryAlias v
@@ -3740,7 +3740,7 @@ Project [q1#xL, q2#xL, bq1#xL, cq1#xL, least(outer(a.q1), q1, q1)#xL]
: +- LocalRelation [col1#xL, col2#xL]
+- SubqueryAlias a
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias v
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/select.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/select.sql.out
index 9703c5dbc2d2..875673dd72ec 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/select.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/select.sql.out
@@ -119,7 +119,7 @@ SELECT onek2.* FROM onek2 WHERE onek2.unique1 < 10
Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- Filter (unique1#x < 10)
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -135,7 +135,7 @@ Sort [unique1#x DESC NULLS LAST], true
+- Project [unique1#x, stringu1#x]
+- Filter (unique1#x < 20)
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stri [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -149,7 +149,7 @@ SELECT onek2.unique1, onek2.stringu1 FROM onek2
Project [unique1#x, stringu1#x]
+- Filter (unique1#x > 980)
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -229,7 +229,7 @@ Union false, false
: +- OneRowRelation
+- Project [q1#xL, cast(q2#xL as decimal(21,1)) AS q2#x]
+- SubqueryAlias int8_tbl
- +- View (`INT8_TBL`, [q1#xL,q2#xL])
+ +- View (`INT8_TBL`, [q1#xL, q2#xL])
+- Project [cast(q1#xL as bigint) AS q1#xL, cast(q2#xL as bigint) AS q2#xL]
+- Project [q1#xL, q2#xL]
+- SubqueryAlias INT8_TBL
@@ -323,7 +323,7 @@ select * from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'
Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- Filter ((unique2#x = 11) AND (stringu1#x = ATAAAA))
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -336,7 +336,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 = 'ATAAAA'
Project [unique2#x]
+- Filter ((unique2#x = 11) AND (stringu1#x = ATAAAA))
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -349,7 +349,7 @@ select * from onek2 where unique2 = 11 and stringu1 < 'B'
Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- Filter ((unique2#x = 11) AND (stringu1#x < B))
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -362,7 +362,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'
Project [unique2#x]
+- Filter ((unique2#x = 11) AND (stringu1#x < B))
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -375,7 +375,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'C'
Project [unique2#x]
+- Filter ((unique2#x = 11) AND (stringu1#x < C))
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -388,7 +388,7 @@ select unique2 from onek2 where unique2 = 11 and stringu1 < 'B'
Project [unique2#x]
+- Filter ((unique2#x = 11) AND (stringu1#x < B))
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -402,7 +402,7 @@ select unique1, unique2 from onek2
Project [unique1#x, unique2#x]
+- Filter (((unique2#x = 11) OR (unique1#x = 0)) AND (stringu1#x < B))
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -416,7 +416,7 @@ select unique1, unique2 from onek2
Project [unique1#x, unique2#x]
+- Filter (((unique2#x = 11) AND (stringu1#x < B)) OR (unique1#x = 0))
+- SubqueryAlias onek2
- +- View (`onek2`, [unique1#x,unique2#x,two#x,four#x,ten#x,twenty#x,hundred#x,thousand#x,twothousand#x,fivethous#x,tenthous#x,odd#x,even#x,stringu1#x,stringu2#x,string4#x])
+ +- View (`onek2`, [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x])
+- Project [cast(unique1#x as int) AS unique1#x, cast(unique2#x as int) AS unique2#x, cast(two#x as int) AS two#x, cast(four#x as int) AS four#x, cast(ten#x as int) AS ten#x, cast(twenty#x as int) AS twenty#x, cast(hundred#x as int) AS hundred#x, cast(thousand#x as int) AS thousand#x, cast(twothousand#x as int) AS twothousand#x, cast(fivethous#x as int) AS fivethous#x, cast(tenthous#x as int) AS tenthous#x, cast(odd#x as int) AS odd#x, cast(even#x as int) AS even#x, cast(stringu [...]
+- Project [unique1#x, unique2#x, two#x, four#x, ten#x, twenty#x, hundred#x, thousand#x, twothousand#x, fivethous#x, tenthous#x, odd#x, even#x, stringu1#x, stringu2#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
diff --git a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/select_distinct.sql.out b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/select_distinct.sql.out
index 9ede4682842d..bd653048a2ed 100644
--- a/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/select_distinct.sql.out
+++ b/sql/core/src/test/resources/sql-tests/analyzer-results/postgreSQL/select_distinct.sql.out
@@ -18,7 +18,7 @@ Sort [two#x ASC NULLS FIRST], true
+- Distinct
+- Project [two#x]
+- SubqueryAlias tmp
- +- View (`tmp`, [two#x,stringu1#x,ten#x,string4#x])
+ +- View (`tmp`, [two#x, stringu1#x, ten#x, string4#x])
+- Project [cast(two#x as int) AS two#x, cast(stringu1#x as string) AS stringu1#x, cast(ten#x as int) AS ten#x, cast(string4#x as string) AS string4#x]
+- Project [two#x, stringu1#x, ten#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -32,7 +32,7 @@ Sort [ten#x ASC NULLS FIRST], true
+- Distinct
+- Project [ten#x]
+- SubqueryAlias tmp
- +- View (`tmp`, [two#x,stringu1#x,ten#x,string4#x])
+ +- View (`tmp`, [two#x, stringu1#x, ten#x, string4#x])
+- Project [cast(two#x as int) AS two#x, cast(stringu1#x as string) AS stringu1#x, cast(ten#x as int) AS ten#x, cast(string4#x as string) AS string4#x]
+- Project [two#x, stringu1#x, ten#x, string4#x]
+- SubqueryAlias spark_catalog.default.onek
@@ -46,7 +46,7 @@ Sort [string4#x ASC NULLS FIRST], true
... 16533 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org