Skip to content

Commit

Permalink
Revert "feat: new table stream graph (#12240)"
Browse files Browse the repository at this point in the history
This reverts commit 48bf62e.
  • Loading branch information
StrikeW committed Nov 20, 2023
1 parent 0b1415c commit aaf41e6
Show file tree
Hide file tree
Showing 20 changed files with 287 additions and 473 deletions.
94 changes: 47 additions & 47 deletions e2e_test/batch/aggregate/jsonb_agg.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -12,79 +12,79 @@ insert into t values
(true, 3, 'aaa', '{}', '2021-01-01 03:00:00', '3 days');

query T
select jsonb_agg(v1 order by v1) from t;
select jsonb_agg(v1) from t;
----
[false, true, true, null]
[null, false, true, true]

query T
select jsonb_agg(v2::int2 order by v2) from t;
select jsonb_agg(v2::int2) from t;
----
[1, 2, 3, null]
[null, 1, 2, 3]

query T
select jsonb_agg(v2::int4 order by v2) from t;
select jsonb_agg(v2::int4) from t;
----
[1, 2, 3, null]
[null, 1, 2, 3]

query T
select jsonb_agg(v2::int8 order by v2) from t;
select jsonb_agg(v2::int8) from t;
----
[1, 2, 3, null]
[null, 1, 2, 3]

query T
select jsonb_agg(v2::float4 order by v2) from t;
select jsonb_agg(v2::float4) from t;
----
[1.0, 2.0, 3.0, null]
[null, 1.0, 2.0, 3.0]

query T
select jsonb_agg(v2::float8 order by v2) from t;
select jsonb_agg(v2::float8) from t;
----
[1.0, 2.0, 3.0, null]
[null, 1.0, 2.0, 3.0]

query T
select jsonb_agg(v2::decimal order by v2) from t;
select jsonb_agg(v2::decimal) from t;
----
[1.0, 2.0, 3.0, null]
[null, 1.0, 2.0, 3.0]

query T
select jsonb_agg(v3 order by v3) from t;
select jsonb_agg(v3) from t;
----
["aaa", "bbb", "ccc", null]
[null, "ccc", "bbb", "aaa"]

query T
select jsonb_agg(v3::bytea order by v3) from t;
select jsonb_agg(v3::bytea) from t;
----
["\\x616161", "\\x626262", "\\x636363", null]
[null, "\\x636363", "\\x626262", "\\x616161"]

query T
select jsonb_agg(v4 order by v4) from t;
select jsonb_agg(v4) from t;
----
[false, null, {}, null]
[null, null, false, {}]

query T
select jsonb_agg(v5::date order by v5) from t;
select jsonb_agg(v5::date) from t;
----
["2019-01-01", "2020-01-01", "2021-01-01", null]
[null, "2019-01-01", "2020-01-01", "2021-01-01"]

query T
select jsonb_agg(v5::time order by v5) from t;
select jsonb_agg(v5::time) from t;
----
["01:00:00", "02:00:00", "03:00:00", null]
[null, "01:00:00", "02:00:00", "03:00:00"]

query T
select jsonb_agg(v5::timestamp order by v5) from t;
select jsonb_agg(v5::timestamp) from t;
----
["2019-01-01T01:00:00", "2020-01-01T02:00:00", "2021-01-01T03:00:00", null]
[null, "2019-01-01T01:00:00", "2020-01-01T02:00:00", "2021-01-01T03:00:00"]

query T
select jsonb_agg(v5::timestamptz order by v5) from t;
select jsonb_agg(v5::timestamptz) from t;
----
["2019-01-01T01:00:00+00:00", "2020-01-01T02:00:00+00:00", "2021-01-01T03:00:00+00:00", null]
[null, "2019-01-01T01:00:00+00:00", "2020-01-01T02:00:00+00:00", "2021-01-01T03:00:00+00:00"]

query T
select jsonb_agg(v6 order by v6) from t;
select jsonb_agg(v6) from t;
----
["1 day", "2 days", "3 days", null]
[null, "1 day", "2 days", "3 days"]

# query T
# select jsonb_agg(distinct v1) from t;
Expand All @@ -97,85 +97,85 @@ select jsonb_agg(v2 order by v3 desc) from t;
[null, 1, 2, 3]

query T
select jsonb_agg(v2 order by v3) filter (where v3 >= 'bbb') from t;
select jsonb_agg(v2) filter (where v3 >= 'bbb') from t;
----
[2, 1]
[1, 2]

statement error field name must not be null
select jsonb_object_agg(v3, v1) from t;

query T
select jsonb_object_agg(v3, v1 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v1) filter (where v3 is not null) from t;
----
{"aaa": true, "bbb": true, "ccc": false}

query T
select jsonb_object_agg(v3, v2::int2 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v2::int2) filter (where v3 is not null) from t;
----
{"aaa": 3, "bbb": 2, "ccc": 1}

query T
select jsonb_object_agg(v3, v2::int4 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v2::int4) filter (where v3 is not null) from t;
----
{"aaa": 3, "bbb": 2, "ccc": 1}

query T
select jsonb_object_agg(v3, v2::int8 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v2::int8) filter (where v3 is not null) from t;
----
{"aaa": 3, "bbb": 2, "ccc": 1}

query T
select jsonb_object_agg(v3, v2::float4 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v2::float4) filter (where v3 is not null) from t;
----
{"aaa": 3.0, "bbb": 2.0, "ccc": 1.0}

query T
select jsonb_object_agg(v3, v2::float8 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v2::float8) filter (where v3 is not null) from t;
----
{"aaa": 3.0, "bbb": 2.0, "ccc": 1.0}

query T
select jsonb_object_agg(v3, v2::decimal order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v2::decimal) filter (where v3 is not null) from t;
----
{"aaa": 3.0, "bbb": 2.0, "ccc": 1.0}

query T
select jsonb_object_agg(v3, v3 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v3) filter (where v3 is not null) from t;
----
{"aaa": "aaa", "bbb": "bbb", "ccc": "ccc"}

query T
select jsonb_object_agg(v3, v3::bytea order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v3::bytea) filter (where v3 is not null) from t;
----
{"aaa": "\\x616161", "bbb": "\\x626262", "ccc": "\\x636363"}

query T
select jsonb_object_agg(v3, v4 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v4) filter (where v3 is not null) from t;
----
{"aaa": {}, "bbb": false, "ccc": null}

query T
select jsonb_object_agg(v3, v5::date order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v5::date) filter (where v3 is not null) from t;
----
{"aaa": "2021-01-01", "bbb": "2020-01-01", "ccc": "2019-01-01"}

query T
select jsonb_object_agg(v3, v5::time order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v5::time) filter (where v3 is not null) from t;
----
{"aaa": "03:00:00", "bbb": "02:00:00", "ccc": "01:00:00"}

query T
select jsonb_object_agg(v3, v5::timestamp order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v5::timestamp) filter (where v3 is not null) from t;
----
{"aaa": "2021-01-01T03:00:00", "bbb": "2020-01-01T02:00:00", "ccc": "2019-01-01T01:00:00"}

query T
select jsonb_object_agg(v3, v5::timestamptz order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v5::timestamptz) filter (where v3 is not null) from t;
----
{"aaa": "2021-01-01T03:00:00+00:00", "bbb": "2020-01-01T02:00:00+00:00", "ccc": "2019-01-01T01:00:00+00:00"}

query T
select jsonb_object_agg(v3, v6 order by v3) filter (where v3 is not null) from t;
select jsonb_object_agg(v3, v6) filter (where v3 is not null) from t;
----
{"aaa": "3 days", "bbb": "2 days", "ccc": "1 day"}

Expand Down
4 changes: 2 additions & 2 deletions e2e_test/batch/basic/table_with_default_columns.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ create table t2 (v1 int, v2 int default 1.5);
statement ok
insert into t2 values (1), (2);

query II rowsort
query II
select * from t2;
----
1 2
Expand All @@ -76,7 +76,7 @@ select * from t2;
statement ok
alter table t2 add column v3 timestamp with time zone default now();

query IT rowsort
query IT
select v1, v3 >= date '2021-01-01' as later_than_2021 from t2;
----
1 t
Expand Down
Loading

0 comments on commit aaf41e6

Please sign in to comment.