This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 9487ca0573 use alias (#9894)
9487ca0573 is described below
commit 9487ca057353370aa75895453c92bb40b9f33ac6
Author: Jay Zhan <[email protected]>
AuthorDate: Mon Apr 1 19:19:17 2024 +0800
use alias (#9894)
Signed-off-by: jayzhan211 <[email protected]>
---
datafusion/sqllogictest/test_files/expr.slt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/datafusion/sqllogictest/test_files/expr.slt
b/datafusion/sqllogictest/test_files/expr.slt
index 2e0cbf50ca..60ab477788 100644
--- a/datafusion/sqllogictest/test_files/expr.slt
+++ b/datafusion/sqllogictest/test_files/expr.slt
@@ -2288,7 +2288,7 @@ select struct(time,load1,load2,host) from t1;
# can have an aggregate function with an inner coalesce
query TR
-select t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] as host,
sum(coalesce(t2."struct(t1.time,t1.load1,t1.load2,t1.host)")['c1']) from
(select struct(time,load1,load2,host) from t1) t2 where
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] IS NOT NULL group by
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] order by host;
+select t2.info['c3'] as host, sum(coalesce(t2.info)['c1']) from (select
struct(time,load1,load2,host) as info from t1) t2 where t2.info['c3'] IS NOT
NULL group by t2.info['c3'] order by host;
----
host1 1.1
host2 2.2
@@ -2296,7 +2296,7 @@ host3 3.3
# can have an aggregate function with an inner CASE WHEN
query TR
-select t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] as host, sum((case
when t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] is not null then
t2."struct(t1.time,t1.load1,t1.load2,t1.host)" end)['c2']) from (select
struct(time,load1,load2,host) from t1) t2 where
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] IS NOT NULL group by
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] order by host;
+select t2.info['c3'] as host, sum((case when t2.info['c3'] is not null then
t2.info end)['c2']) from (select struct(time,load1,load2,host) as info from t1)
t2 where t2.info['c3'] IS NOT NULL group by t2.info['c3'] order by host;
----
host1 101
host2 202
@@ -2304,7 +2304,7 @@ host3 303
# can have 2 projections with aggr(short_circuited), with different
short-circuited expr
query TRR
-select t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] as host,
sum(coalesce(t2."struct(t1.time,t1.load1,t1.load2,t1.host)")['c1']), sum((case
when t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] is not null then
t2."struct(t1.time,t1.load1,t1.load2,t1.host)" end)['c2']) from (select
struct(time,load1,load2,host) from t1) t2 where
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] IS NOT NULL group by
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] order by host;
+select t2.info['c3'] as host, sum(coalesce(t2.info)['c1']), sum((case when
t2.info['c3'] is not null then t2.info end)['c2']) from (select
struct(time,load1,load2,host) as info from t1) t2 where t2.info['c3'] IS NOT
NULL group by t2.info['c3'] order by host;
----
host1 1.1 101
host2 2.2 202
@@ -2312,7 +2312,7 @@ host3 3.3 303
# can have 2 projections with aggr(short_circuited), with the same
short-circuited expr (e.g. CASE WHEN)
query TRR
-select t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] as host, sum((case
when t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] is not null then
t2."struct(t1.time,t1.load1,t1.load2,t1.host)" end)['c1']), sum((case when
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] is not null then
t2."struct(t1.time,t1.load1,t1.load2,t1.host)" end)['c2']) from (select
struct(time,load1,load2,host) from t1) t2 where
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] IS NOT NULL group by [...]
+select t2.info['c3'] as host, sum((case when t2.info['c3'] is not null then
t2.info end)['c1']), sum((case when t2.info['c3'] is not null then t2.info
end)['c2']) from (select struct(time,load1,load2,host) as info from t1) t2
where t2.info['c3'] IS NOT NULL group by t2.info['c3'] order by host;
----
host1 1.1 101
host2 2.2 202
@@ -2320,7 +2320,7 @@ host3 3.3 303
# can have 2 projections with aggr(short_circuited), with the same
short-circuited expr (e.g. coalesce)
query TRR
-select t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] as host,
sum(coalesce(t2."struct(t1.time,t1.load1,t1.load2,t1.host)")['c1']),
sum(coalesce(t2."struct(t1.time,t1.load1,t1.load2,t1.host)")['c2']) from
(select struct(time,load1,load2,host) from t1) t2 where
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] IS NOT NULL group by
t2."struct(t1.time,t1.load1,t1.load2,t1.host)"['c3'] order by host;
+select t2.info['c3'] as host, sum(coalesce(t2.info)['c1']),
sum(coalesce(t2.info)['c2']) from (select struct(time,load1,load2,host) as info
from t1) t2 where t2.info['c3'] IS NOT NULL group by t2.info['c3'] order by
host;
----
host1 1.1 101
host2 2.2 202