diff --git a/e2e_test/batch/aggregate/jsonb_agg.slt.part b/e2e_test/batch/aggregate/jsonb_agg.slt.part
index fad23dda14c68..97eb4462b8414 100644
--- a/e2e_test/batch/aggregate/jsonb_agg.slt.part
+++ b/e2e_test/batch/aggregate/jsonb_agg.slt.part
@@ -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) from t;
+select jsonb_agg(v1 order by v1) from t;
 ----
-[null, false, true, true]
+[false, true, true, null]
 
 query T
-select jsonb_agg(v2::int2) from t;
+select jsonb_agg(v2::int2 order by v2) from t;
 ----
-[null, 1, 2, 3]
+[1, 2, 3, null]
 
 query T
-select jsonb_agg(v2::int4) from t;
+select jsonb_agg(v2::int4 order by v2) from t;
 ----
-[null, 1, 2, 3]
+[1, 2, 3, null]
 
 query T
-select jsonb_agg(v2::int8) from t;
+select jsonb_agg(v2::int8 order by v2) from t;
 ----
-[null, 1, 2, 3]
+[1, 2, 3, null]
 
 query T
-select jsonb_agg(v2::float4) from t;
+select jsonb_agg(v2::float4 order by v2) from t;
 ----
-[null, 1.0, 2.0, 3.0]
+[1.0, 2.0, 3.0, null]
 
 query T
-select jsonb_agg(v2::float8) from t;
+select jsonb_agg(v2::float8 order by v2) from t;
 ----
-[null, 1.0, 2.0, 3.0]
+[1.0, 2.0, 3.0, null]
 
 query T
-select jsonb_agg(v2::decimal) from t;
+select jsonb_agg(v2::decimal order by v2) from t;
 ----
-[null, 1.0, 2.0, 3.0]
+[1.0, 2.0, 3.0, null]
 
 query T
-select jsonb_agg(v3) from t;
+select jsonb_agg(v3 order by v3) from t;
 ----
-[null, "ccc", "bbb", "aaa"]
+["aaa", "bbb", "ccc", null]
 
 query T
-select jsonb_agg(v3::bytea) from t;
+select jsonb_agg(v3::bytea order by v3) from t;
 ----
-[null, "\\x636363", "\\x626262", "\\x616161"]
+["\\x616161", "\\x626262", "\\x636363", null]
 
 query T
-select jsonb_agg(v4) from t;
+select jsonb_agg(v4 order by v4) from t;
 ----
-[null, null, false, {}]
+[false, null, {}, null]
 
 query T
-select jsonb_agg(v5::date) from t;
+select jsonb_agg(v5::date order by v5) from t;
 ----
-[null, "2019-01-01", "2020-01-01", "2021-01-01"]
+["2019-01-01", "2020-01-01", "2021-01-01", null]
 
 query T
-select jsonb_agg(v5::time) from t;
+select jsonb_agg(v5::time order by v5) from t;
 ----
-[null, "01:00:00", "02:00:00", "03:00:00"]
+["01:00:00", "02:00:00", "03:00:00", null]
 
 query T
-select jsonb_agg(v5::timestamp) from t;
+select jsonb_agg(v5::timestamp order by v5) from t;
 ----
-[null, "2019-01-01T01:00:00", "2020-01-01T02:00:00", "2021-01-01T03:00:00"]
+["2019-01-01T01:00:00", "2020-01-01T02:00:00", "2021-01-01T03:00:00", null]
 
 query T
-select jsonb_agg(v5::timestamptz) from t;
+select jsonb_agg(v5::timestamptz order by v5) from t;
 ----
-[null, "2019-01-01T01:00:00+00:00", "2020-01-01T02:00:00+00:00", "2021-01-01T03:00:00+00:00"]
+["2019-01-01T01:00:00+00:00", "2020-01-01T02:00:00+00:00", "2021-01-01T03:00:00+00:00", null]
 
 query T
-select jsonb_agg(v6) from t;
+select jsonb_agg(v6 order by v6) from t;
 ----
-[null, "1 day", "2 days", "3 days"]
+["1 day", "2 days", "3 days", null]
 
 # query T
 # select jsonb_agg(distinct v1) from t;
@@ -97,85 +97,85 @@ select jsonb_agg(v2 order by v3 desc) from t;
 [null, 1, 2, 3]
 
 query T
-select jsonb_agg(v2) filter (where v3 >= 'bbb') from t;
+select jsonb_agg(v2 order by v3) filter (where v3 >= 'bbb') from t;
 ----
-[1, 2]
+[2, 1]
 
 statement error field name must not be null
 select jsonb_object_agg(v3, v1) from t;
 
 query T
-select jsonb_object_agg(v3, v1) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v1 order by v3) filter (where v3 is not null) from t;
 ----
 {"aaa": true, "bbb": true, "ccc": false}
 
 query T
-select jsonb_object_agg(v3, v2::int2) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v2::int2 order by v3) filter (where v3 is not null) from t;
 ----
 {"aaa": 3, "bbb": 2, "ccc": 1}
 
 query T
-select jsonb_object_agg(v3, v2::int4) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v2::int4 order by v3) filter (where v3 is not null) from t;
 ----
 {"aaa": 3, "bbb": 2, "ccc": 1}
 
 query T
-select jsonb_object_agg(v3, v2::int8) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v2::int8 order by v3) filter (where v3 is not null) from t;
 ----
 {"aaa": 3, "bbb": 2, "ccc": 1}
 
 query T
-select jsonb_object_agg(v3, v2::float4) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v2::float4 order by v3) 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) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v2::float8 order by v3) 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) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v2::decimal order by v3) 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) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v3 order by v3) filter (where v3 is not null) from t;
 ----
 {"aaa": "aaa", "bbb": "bbb", "ccc": "ccc"}
 
 query T
-select jsonb_object_agg(v3, v3::bytea) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v3::bytea order by v3) filter (where v3 is not null) from t;
 ----
 {"aaa": "\\x616161", "bbb": "\\x626262", "ccc": "\\x636363"}
 
 query T
-select jsonb_object_agg(v3, v4) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v4 order by v3) filter (where v3 is not null) from t;
 ----
 {"aaa": {}, "bbb": false, "ccc": null}
 
 query T
-select jsonb_object_agg(v3, v5::date) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v5::date order by v3) 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) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v5::time order by v3) 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) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v5::timestamp order by v3) 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) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v5::timestamptz order by v3) 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) filter (where v3 is not null) from t;
+select jsonb_object_agg(v3, v6 order by v3) filter (where v3 is not null) from t;
 ----
 {"aaa": "3 days", "bbb": "2 days", "ccc": "1 day"}
 
diff --git a/e2e_test/batch/basic/table_with_default_columns.slt.part b/e2e_test/batch/basic/table_with_default_columns.slt.part
index da37cd7787de1..117850683f6b9 100644
--- a/e2e_test/batch/basic/table_with_default_columns.slt.part
+++ b/e2e_test/batch/basic/table_with_default_columns.slt.part
@@ -66,7 +66,7 @@ create table t2 (v1 int, v2 int default 1.5);
 statement ok
 insert into t2 values (1), (2);
 
-query II
+query II rowsort
 select * from t2;
 ----
 1 2
@@ -76,7 +76,7 @@ select * from t2;
 statement ok
 alter table t2 add column v3 timestamp with time zone default now();
 
-query IT
+query IT rowsort
 select v1, v3 >= date '2021-01-01' as later_than_2021 from t2;
 ----
 1 t
diff --git a/e2e_test/batch/basic/to_jsonb.slt.part b/e2e_test/batch/basic/to_jsonb.slt.part
index 9cad572daf8d0..471a4de9f41ae 100644
--- a/e2e_test/batch/basic/to_jsonb.slt.part
+++ b/e2e_test/batch/basic/to_jsonb.slt.part
@@ -230,7 +230,7 @@ statement ok
 INSERT INTO structtype VALUES (row(6, 'v1')), (row(7, 'v2'));
 
 query T
-SELECT to_jsonb(st) from structtype;
+SELECT to_jsonb(st) from structtype order by (st).key;
 ----
 {"key": 6, "val": "v1"}
 {"key": 7, "val": "v2"}
@@ -252,37 +252,37 @@ INSERT INTO alltypes VALUES
 (false, (SMALLINT '972'), (INT '-235825836'), (BIGINT '842'), (REAL '27'), (FLOAT '675'), (0), DATE '2023-08-25', 'uwAFEeex9Y', TIME '22:12:37', TIMESTAMP '2023-09-01 22:11:40', '2023-09-01 22:12:37Z'::TIMESTAMPTZ, (INTERVAL '28'), CAST(NULL AS STRUCT<a INT>), ARRAY[(INT '355')], ARRAY['xan6o2VHID', 'MTSy3lzImo', 'UZqnEMW60w'], BYTEA'\xAABBCCDDEEFF', '"value3"'::JSONB);
 
 query T
-SELECT to_jsonb(row(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18)) from alltypes;
+SELECT to_jsonb(row(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18)) from alltypes order by c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18;
 ----
-{"f1": true, "f10": "22:12:54", "f11": "2023-09-01T22:12:42", "f12": "2023-09-01T22:12:42+00:00", "f13": "-00:01:18", "f14": null, "f15": [354, 627], "f16": ["yRMgX7pFXW", "r7PAN6KB2b", "NQJbRQoVib"], "f17": "\\xdeadbeef", "f18": {"key1": "value1"}, "f2": 786, "f3": 1409922817, "f4": 925, "f5": 536.0, "f6": 782.0, "f7": 487.0, "f8": "2023-09-01", "f9": "IwfwuseZmg"}
-{"f1": true, "f10": "22:12:25", "f11": "2023-09-01T21:12:54", "f12": "2023-09-01T21:12:54+00:00", "f13": "24:00:00", "f14": null, "f15": [0], "f16": ["3NE5ewEx4T"], "f17": "\\xdeadbeef", "f18": {"key2": "value2"}, "f2": 82, "f3": 216, "f4": 732, "f5": 337.0, "f6": 772.0, "f7": 378.0, "f8": "2023-09-01", "f9": "6nNf6LL2C1"}
-{"f1": false, "f10": "22:11:17", "f11": "2023-09-01T22:11:50", "f12": "2023-09-01T21:12:54+00:00", "f13": "-00:01:31", "f14": null, "f15": [77, 718, 401, 874], "f16": ["k6N5rUX8p1", "sFRQ1u2ihF"], "f17": "\\x0123456789abcdef", "f18": null, "f2": 761, "f3": 966, "f4": 153, "f5": 1023789440.0, "f6": 752.0, "f7": 630.0, "f8": "2023-09-01", "f9": "ySrgeBXDuc"}
 {"f1": false, "f10": "22:11:54", "f11": "2023-09-01T22:12:54", "f12": "2023-09-01T21:12:54+00:00", "f13": "-00:01:24", "f14": null, "f15": [246, 120, 154], "f16": ["Rau1Iezv50", "uWtqX1jIP0", "N356wachUq", "tDVFlmtDNk"], "f17": "\\x00ff00", "f18": {"key3": ["value3", "value55"]}, "f2": 255, "f3": 1, "f4": 9223372036854775807, "f5": 0.0, "f6": 775.0, "f7": -2147483648.0, "f8": "2023-09-01", "f9": "2498VN2txc"}
+{"f1": false, "f10": "22:11:17", "f11": "2023-09-01T22:11:50", "f12": "2023-09-01T21:12:54+00:00", "f13": "-00:01:31", "f14": null, "f15": [77, 718, 401, 874], "f16": ["k6N5rUX8p1", "sFRQ1u2ihF"], "f17": "\\x0123456789abcdef", "f18": null, "f2": 761, "f3": 966, "f4": 153, "f5": 1023789440.0, "f6": 752.0, "f7": 630.0, "f8": "2023-09-01", "f9": "ySrgeBXDuc"}
+{"f1": false, "f10": "22:12:37", "f11": "2023-09-01T22:11:40", "f12": "2023-09-01T22:12:37+00:00", "f13": "00:00:28", "f14": null, "f15": [355], "f16": ["xan6o2VHID", "MTSy3lzImo", "UZqnEMW60w"], "f17": "\\xaabbccddeeff", "f18": "value3", "f2": 972, "f3": -235825836, "f4": 842, "f5": 27.0, "f6": 675.0, "f7": 0.0, "f8": "2023-08-25", "f9": "uwAFEeex9Y"}
+{"f1": true, "f10": "22:12:25", "f11": "2023-09-01T21:12:54", "f12": "2023-09-01T21:12:54+00:00", "f13": "24:00:00", "f14": null, "f15": [0], "f16": ["3NE5ewEx4T"], "f17": "\\xdeadbeef", "f18": {"key2": "value2"}, "f2": 82, "f3": 216, "f4": 732, "f5": 337.0, "f6": 772.0, "f7": 378.0, "f8": "2023-09-01", "f9": "6nNf6LL2C1"}
+{"f1": true, "f10": "22:12:54", "f11": "2023-09-01T22:12:42", "f12": "2023-09-01T22:12:42+00:00", "f13": "-00:01:18", "f14": null, "f15": [354, 627], "f16": ["yRMgX7pFXW", "r7PAN6KB2b", "NQJbRQoVib"], "f17": "\\xdeadbeef", "f18": {"key1": "value1"}, "f2": 786, "f3": 1409922817, "f4": 925, "f5": 536.0, "f6": 782.0, "f7": 487.0, "f8": "2023-09-01", "f9": "IwfwuseZmg"}
 {"f1": true, "f10": "22:12:54", "f11": "2023-09-01T22:12:02", "f12": "2023-09-01T22:12:02+00:00", "f13": "01:00:00", "f14": null, "f15": [329, 577, 255, 70], "f16": ["1HQloIk7oW", "ixxNgP8vaq", "9CSOsftyRA", "jiqocRdrUC"], "f17": "\\x00ff00", "f18": {"key4": {"inner_key": "value4"}}, "f2": 933, "f3": 915, "f4": 433, "f5": 734.0, "f6": 438.0, "f7": 998512901.0, "f8": "2023-09-01", "f9": "Qgfzps4qkX"}
 {"f1": true, "f10": "22:12:40", "f11": "2023-09-01T22:11:27", "f12": "2023-09-01T22:12:02+00:00", "f13": "-00:01:00", "f14": null, "f15": [252, 137, 110, 574], "f16": ["t5073iSwvs"], "f17": "\\x80", "f18": null, "f2": 7096, "f3": -1627323193, "f4": 191, "f5": 483.0, "f6": 85.0, "f7": -2147483648.0, "f8": "2023-09-01", "f9": "sLgs9Am1iP"}
-{"f1": false, "f10": "22:12:37", "f11": "2023-09-01T22:11:40", "f12": "2023-09-01T22:12:37+00:00", "f13": "00:00:28", "f14": null, "f15": [355], "f16": ["xan6o2VHID", "MTSy3lzImo", "UZqnEMW60w"], "f17": "\\xaabbccddeeff", "f18": "value3", "f2": 972, "f3": -235825836, "f4": 842, "f5": 27.0, "f6": 675.0, "f7": 0.0, "f8": "2023-08-25", "f9": "uwAFEeex9Y"}
 
 query T
-SELECT jsonb_build_array(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18) from alltypes;
+SELECT jsonb_build_array(c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18) from alltypes order by c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18;
 ----
-[true, 786, 1409922817, 925, 536.0, 782.0, 487.0, "2023-09-01", "IwfwuseZmg", "22:12:54", "2023-09-01T22:12:42", "2023-09-01T22:12:42+00:00", "-00:01:18", null, [354, 627], ["yRMgX7pFXW", "r7PAN6KB2b", "NQJbRQoVib"], "\\xdeadbeef", {"key1": "value1"}]
-[true, 82, 216, 732, 337.0, 772.0, 378.0, "2023-09-01", "6nNf6LL2C1", "22:12:25", "2023-09-01T21:12:54", "2023-09-01T21:12:54+00:00", "24:00:00", null, [0], ["3NE5ewEx4T"], "\\xdeadbeef", {"key2": "value2"}]
-[false, 761, 966, 153, 1023789440.0, 752.0, 630.0, "2023-09-01", "ySrgeBXDuc", "22:11:17", "2023-09-01T22:11:50", "2023-09-01T21:12:54+00:00", "-00:01:31", null, [77, 718, 401, 874], ["k6N5rUX8p1", "sFRQ1u2ihF"], "\\x0123456789abcdef", null]
 [false, 255, 1, 9223372036854775807, 0.0, 775.0, -2147483648.0, "2023-09-01", "2498VN2txc", "22:11:54", "2023-09-01T22:12:54", "2023-09-01T21:12:54+00:00", "-00:01:24", null, [246, 120, 154], ["Rau1Iezv50", "uWtqX1jIP0", "N356wachUq", "tDVFlmtDNk"], "\\x00ff00", {"key3": ["value3", "value55"]}]
+[false, 761, 966, 153, 1023789440.0, 752.0, 630.0, "2023-09-01", "ySrgeBXDuc", "22:11:17", "2023-09-01T22:11:50", "2023-09-01T21:12:54+00:00", "-00:01:31", null, [77, 718, 401, 874], ["k6N5rUX8p1", "sFRQ1u2ihF"], "\\x0123456789abcdef", null]
+[false, 972, -235825836, 842, 27.0, 675.0, 0.0, "2023-08-25", "uwAFEeex9Y", "22:12:37", "2023-09-01T22:11:40", "2023-09-01T22:12:37+00:00", "00:00:28", null, [355], ["xan6o2VHID", "MTSy3lzImo", "UZqnEMW60w"], "\\xaabbccddeeff", "value3"]
+[true, 82, 216, 732, 337.0, 772.0, 378.0, "2023-09-01", "6nNf6LL2C1", "22:12:25", "2023-09-01T21:12:54", "2023-09-01T21:12:54+00:00", "24:00:00", null, [0], ["3NE5ewEx4T"], "\\xdeadbeef", {"key2": "value2"}]
+[true, 786, 1409922817, 925, 536.0, 782.0, 487.0, "2023-09-01", "IwfwuseZmg", "22:12:54", "2023-09-01T22:12:42", "2023-09-01T22:12:42+00:00", "-00:01:18", null, [354, 627], ["yRMgX7pFXW", "r7PAN6KB2b", "NQJbRQoVib"], "\\xdeadbeef", {"key1": "value1"}]
 [true, 933, 915, 433, 734.0, 438.0, 998512901.0, "2023-09-01", "Qgfzps4qkX", "22:12:54", "2023-09-01T22:12:02", "2023-09-01T22:12:02+00:00", "01:00:00", null, [329, 577, 255, 70], ["1HQloIk7oW", "ixxNgP8vaq", "9CSOsftyRA", "jiqocRdrUC"], "\\x00ff00", {"key4": {"inner_key": "value4"}}]
 [true, 7096, -1627323193, 191, 483.0, 85.0, -2147483648.0, "2023-09-01", "sLgs9Am1iP", "22:12:40", "2023-09-01T22:11:27", "2023-09-01T22:12:02+00:00", "-00:01:00", null, [252, 137, 110, 574], ["t5073iSwvs"], "\\x80", null]
-[false, 972, -235825836, 842, 27.0, 675.0, 0.0, "2023-08-25", "uwAFEeex9Y", "22:12:37", "2023-09-01T22:11:40", "2023-09-01T22:12:37+00:00", "00:00:28", null, [355], ["xan6o2VHID", "MTSy3lzImo", "UZqnEMW60w"], "\\xaabbccddeeff", "value3"]
 
 query T
-SELECT jsonb_build_object(c1, c1, c2, c2, c3, c3, c4, c4, c5, c5, c6, c6, c7, c7, c8, c8, c9, c9, c10, c10, c11, c11, c12, c12, c13, c13, 'f14', c14, 'f15', c15, 'f16', c16, c17, c17, 'f18', c18) from alltypes;
+SELECT jsonb_build_object(c1, c1, c2, c2, c3, c3, c4, c4, c5, c5, c6, c6, c7, c7, c8, c8, c9, c9, c10, c10, c11, c11, c12, c12, c13, c13, 'f14', c14, 'f15', c15, 'f16', c16, c17, c17, 'f18', c18) from alltypes order by c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18;
 ----
-{"-00:01:18": "-00:01:18", "1409922817": 1409922817, "2023-09-01": "2023-09-01", "2023-09-01 22:12:42": "2023-09-01T22:12:42", "2023-09-01 22:12:42+00:00": "2023-09-01T22:12:42+00:00", "22:12:54": "22:12:54", "487": 487.0, "536": 536.0, "782": 782.0, "786": 786, "925": 925, "IwfwuseZmg": "IwfwuseZmg", "\\xdeadbeef": "\\xdeadbeef", "f14": null, "f15": [354, 627], "f16": ["yRMgX7pFXW", "r7PAN6KB2b", "NQJbRQoVib"], "f18": {"key1": "value1"}, "true": true}
-{"2023-09-01": "2023-09-01", "2023-09-01 21:12:54": "2023-09-01T21:12:54", "2023-09-01 21:12:54+00:00": "2023-09-01T21:12:54+00:00", "216": 216, "22:12:25": "22:12:25", "24:00:00": "24:00:00", "337": 337.0, "378": 378.0, "6nNf6LL2C1": "6nNf6LL2C1", "732": 732, "772": 772.0, "82": 82, "\\xdeadbeef": "\\xdeadbeef", "f14": null, "f15": [0], "f16": ["3NE5ewEx4T"], "f18": {"key2": "value2"}, "true": true}
-{"-00:01:31": "-00:01:31", "1023789440": 1023789440.0, "153": 153, "2023-09-01": "2023-09-01", "2023-09-01 21:12:54+00:00": "2023-09-01T21:12:54+00:00", "2023-09-01 22:11:50": "2023-09-01T22:11:50", "22:11:17": "22:11:17", "630": 630.0, "752": 752.0, "761": 761, "966": 966, "\\x0123456789abcdef": "\\x0123456789abcdef", "f14": null, "f15": [77, 718, 401, 874], "f16": ["k6N5rUX8p1", "sFRQ1u2ihF"], "f18": null, "false": false, "ySrgeBXDuc": "ySrgeBXDuc"}
 {"-00:01:24": "-00:01:24", "-2147483648": -2147483648.0, "0": 0.0, "1": 1, "2023-09-01": "2023-09-01", "2023-09-01 21:12:54+00:00": "2023-09-01T21:12:54+00:00", "2023-09-01 22:12:54": "2023-09-01T22:12:54", "22:11:54": "22:11:54", "2498VN2txc": "2498VN2txc", "255": 255, "775": 775.0, "9223372036854775807": 9223372036854775807, "\\x00ff00": "\\x00ff00", "f14": null, "f15": [246, 120, 154], "f16": ["Rau1Iezv50", "uWtqX1jIP0", "N356wachUq", "tDVFlmtDNk"], "f18": {"key3": ["value3", "value55"]}, "false": false}
+{"-00:01:31": "-00:01:31", "1023789440": 1023789440.0, "153": 153, "2023-09-01": "2023-09-01", "2023-09-01 21:12:54+00:00": "2023-09-01T21:12:54+00:00", "2023-09-01 22:11:50": "2023-09-01T22:11:50", "22:11:17": "22:11:17", "630": 630.0, "752": 752.0, "761": 761, "966": 966, "\\x0123456789abcdef": "\\x0123456789abcdef", "f14": null, "f15": [77, 718, 401, 874], "f16": ["k6N5rUX8p1", "sFRQ1u2ihF"], "f18": null, "false": false, "ySrgeBXDuc": "ySrgeBXDuc"}
+{"-235825836": -235825836, "0": 0.0, "00:00:28": "00:00:28", "2023-08-25": "2023-08-25", "2023-09-01 22:11:40": "2023-09-01T22:11:40", "2023-09-01 22:12:37+00:00": "2023-09-01T22:12:37+00:00", "22:12:37": "22:12:37", "27": 27.0, "675": 675.0, "842": 842, "972": 972, "\\xaabbccddeeff": "\\xaabbccddeeff", "f14": null, "f15": [355], "f16": ["xan6o2VHID", "MTSy3lzImo", "UZqnEMW60w"], "f18": "value3", "false": false, "uwAFEeex9Y": "uwAFEeex9Y"}
+{"2023-09-01": "2023-09-01", "2023-09-01 21:12:54": "2023-09-01T21:12:54", "2023-09-01 21:12:54+00:00": "2023-09-01T21:12:54+00:00", "216": 216, "22:12:25": "22:12:25", "24:00:00": "24:00:00", "337": 337.0, "378": 378.0, "6nNf6LL2C1": "6nNf6LL2C1", "732": 732, "772": 772.0, "82": 82, "\\xdeadbeef": "\\xdeadbeef", "f14": null, "f15": [0], "f16": ["3NE5ewEx4T"], "f18": {"key2": "value2"}, "true": true}
+{"-00:01:18": "-00:01:18", "1409922817": 1409922817, "2023-09-01": "2023-09-01", "2023-09-01 22:12:42": "2023-09-01T22:12:42", "2023-09-01 22:12:42+00:00": "2023-09-01T22:12:42+00:00", "22:12:54": "22:12:54", "487": 487.0, "536": 536.0, "782": 782.0, "786": 786, "925": 925, "IwfwuseZmg": "IwfwuseZmg", "\\xdeadbeef": "\\xdeadbeef", "f14": null, "f15": [354, 627], "f16": ["yRMgX7pFXW", "r7PAN6KB2b", "NQJbRQoVib"], "f18": {"key1": "value1"}, "true": true}
 {"01:00:00": "01:00:00", "2023-09-01": "2023-09-01", "2023-09-01 22:12:02": "2023-09-01T22:12:02", "2023-09-01 22:12:02+00:00": "2023-09-01T22:12:02+00:00", "22:12:54": "22:12:54", "433": 433, "438": 438.0, "734": 734.0, "915": 915, "933": 933, "998512901": 998512901.0, "Qgfzps4qkX": "Qgfzps4qkX", "\\x00ff00": "\\x00ff00", "f14": null, "f15": [329, 577, 255, 70], "f16": ["1HQloIk7oW", "ixxNgP8vaq", "9CSOsftyRA", "jiqocRdrUC"], "f18": {"key4": {"inner_key": "value4"}}, "true": true}
 {"-00:01:00": "-00:01:00", "-1627323193": -1627323193, "-2147483648": -2147483648.0, "191": 191, "2023-09-01": "2023-09-01", "2023-09-01 22:11:27": "2023-09-01T22:11:27", "2023-09-01 22:12:02+00:00": "2023-09-01T22:12:02+00:00", "22:12:40": "22:12:40", "483": 483.0, "7096": 7096, "85": 85.0, "\\x80": "\\x80", "f14": null, "f15": [252, 137, 110, 574], "f16": ["t5073iSwvs"], "f18": null, "sLgs9Am1iP": "sLgs9Am1iP", "true": true}
-{"-235825836": -235825836, "0": 0.0, "00:00:28": "00:00:28", "2023-08-25": "2023-08-25", "2023-09-01 22:11:40": "2023-09-01T22:11:40", "2023-09-01 22:12:37+00:00": "2023-09-01T22:12:37+00:00", "22:12:37": "22:12:37", "27": 27.0, "675": 675.0, "842": 842, "972": 972, "\\xaabbccddeeff": "\\xaabbccddeeff", "f14": null, "f15": [355], "f16": ["xan6o2VHID", "MTSy3lzImo", "UZqnEMW60w"], "f18": "value3", "false": false, "uwAFEeex9Y": "uwAFEeex9Y"}
 
 query T
 SELECT jsonb_build_array();
diff --git a/e2e_test/ddl/table/generated_columns.slt.part b/e2e_test/ddl/table/generated_columns.slt.part
index 88294172ac206..2271522a47fd9 100644
--- a/e2e_test/ddl/table/generated_columns.slt.part
+++ b/e2e_test/ddl/table/generated_columns.slt.part
@@ -8,7 +8,7 @@ insert into t1 (v2) values (1), (2);
 statement ok
 flush;
 
-query IIIR
+query IIIR rowsort
 select * from t1;
 ----
 0 1 2 2.02
@@ -52,7 +52,7 @@ insert into t2 values (1), (2);
 statement ok
 flush;
 
-query II
+query II rowsort
 select * from t2;
 ----
 1 2
@@ -124,7 +124,7 @@ sleep 2s
 statement ok
 flush;
 
-query TT
+query TT rowsort
 select v, t >= date '2021-01-01' as later_than_2021 from mv;
 ----
 1 t