Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/BABEL_5_X_DEV' into JIRA-BABEL…
Browse files Browse the repository at this point in the history
…-5270
  • Loading branch information
roshan0708 committed Feb 3, 2025
2 parents 9fe0945 + 376cf48 commit 3fb8a8a
Show file tree
Hide file tree
Showing 18 changed files with 222 additions and 213 deletions.
18 changes: 12 additions & 6 deletions test/JDBC/expected/BABEL-2998.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,76 @@
SELECT CAST('1' AS CHAR(10)) AS Col1
UNION
SELECT NULL AS Col1
ORDER BY Col1
GO
~~START~~
char
1
<NULL>
1
~~END~~


SELECT CAST('1' AS CHAR(10)) AS Col1
UNION ALL
SELECT NULL AS Col1
GROUP BY Col1
ORDER BY Col1
GO
~~START~~
char
1
<NULL>
1
~~END~~


-- taking suggestion from above error, added explicit CAST and CONVERT
SELECT CAST('1' AS CHAR(10)) AS Col1
UNION
SELECT CAST(NULL AS CHAR(10)) AS Col1
ORDER BY Col1
GO
~~START~~
char
1
<NULL>
1
~~END~~


SELECT CAST('1' AS CHAR(10)) AS Col1
UNION ALL
SELECT CONVERT(CHAR(10), NULL) AS Col1
GROUP BY Col1
ORDER BY Col1
GO
~~START~~
char
1
<NULL>
1
~~END~~


SELECT CAST('1' AS CHAR(10)) AS Col1
UNION ALL
SELECT CAST(NULL AS CHAR(10)) AS Col1
GROUP BY Col1
ORDER BY Col1
GO
~~START~~
char
1
<NULL>
1
~~END~~


SELECT CAST('1' AS CHAR(10)) AS Col1
UNION
SELECT CONVERT(CHAR(10), NULL) AS Col1
ORDER BY Col1
GO
~~START~~
char
1
<NULL>
1
~~END~~


Expand Down
1 change: 1 addition & 0 deletions test/JDBC/expected/BABEL-LIKE2ILIKE.out
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ int
with p1 as (select c1 from like_tesing1 where c1 LIKE '__Ć_'),
p2 as (select c3 from like_tesing1 where c3 LIKE 'äƀ__')
select * from p1 union all select * from p2
order by 1
GO
~~START~~
nvarchar
Expand Down
1 change: 1 addition & 0 deletions test/JDBC/expected/db_collation/BABEL-LIKE2ILIKE.out
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ int
with p1 as (select c1 from like_tesing1 where c1 LIKE '__Ć_'),
p2 as (select c3 from like_tesing1 where c3 LIKE 'äƀ__')
select * from p1 union all select * from p2
order by 1
GO
~~START~~
nvarchar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ int
with p1 as (select c1 from like_tesing1 where c1 LIKE '__Ć_'),
p2 as (select c3 from like_tesing1 where c3 LIKE 'äƀ__')
select * from p1 union all select * from p2
order by 1
GO
~~START~~
nvarchar
Expand Down
34 changes: 17 additions & 17 deletions test/JDBC/expected/parallel_query/BABEL-2843.out
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ text
Query Text: select 1
Gather (cost=0.00..0.01 rows=1 width=4) (actual rows=1 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Result (cost=0.00..0.01 rows=1 width=4) (actual rows=1 loops=1)
~~END~~
Expand All @@ -51,8 +51,8 @@ text
Query Text: select * from babel_2843_t1 where b1 = 1
Gather (cost=0.00..19.11 rows=11 width=8) (actual rows=0 loops=1)
Workers Planned: 3
Workers Launched: 3
-> Parallel Seq Scan on babel_2843_t1 (cost=0.00..19.11 rows=4 width=8) (actual rows=0 loops=4)
Workers Launched: 0
-> Parallel Seq Scan on babel_2843_t1 (cost=0.00..19.11 rows=4 width=8) (actual rows=0 loops=1)
Filter: (b1 = 1)
~~END~~

Expand All @@ -78,7 +78,7 @@ int#!#int

~~START~~
xml
<explain xmlns="http://www.postgresql.org/2009/explain"><newline> <Query-Text>select * from babel_2843_t1 where b1 = 1</Query-Text><newline> <Plan><newline> <Node-Type>Gather</Node-Type><newline> <Parallel-Aware>false</Parallel-Aware><newline> <Async-Capable>false</Async-Capable><newline> <Startup-Cost>0.00</Startup-Cost><newline> <Total-Cost>19.11</Total-Cost><newline> <Plan-Rows>11</Plan-Rows><newline> <Plan-Width>8</Plan-Width><newline> <Actual-Rows>0</Actual-Rows><newline> <Actual-Loops>1</Actual-Loops><newline> <Workers-Planned>3</Workers-Planned><newline> <Workers-Launched>3</Workers-Launched><newline> <Single-Copy>false</Single-Copy><newline> <Plans><newline> <Plan><newline> <Node-Type>Seq Scan</Node-Type><newline> <Parent-Relationship>Outer</Parent-Relationship><newline> <Parallel-Aware>true</Parallel-Aware><newline> <Async-Capable>false</Async-Capable><newline> <Relation-Name>babel_2843_t1</Relation-Name><newline> <Alias>babel_2843_t1</Alias><newline> <Startup-Cost>0.00</Startup-Cost><newline> <Total-Cost>19.11</Total-Cost><newline> <Plan-Rows>4</Plan-Rows><newline> <Plan-Width>8</Plan-Width><newline> <Actual-Rows>0</Actual-Rows><newline> <Actual-Loops>4</Actual-Loops><newline> <Filter>(b1 = 1)</Filter><newline> <Rows-Removed-by-Filter>0</Rows-Removed-by-Filter><newline> <Workers><newline> </Workers><newline> </Plan><newline> </Plans><newline> </Plan><newline> <Triggers><newline> </Triggers><newline></explain>
<explain xmlns="http://www.postgresql.org/2009/explain"><newline> <Query-Text>select * from babel_2843_t1 where b1 = 1</Query-Text><newline> <Plan><newline> <Node-Type>Gather</Node-Type><newline> <Parallel-Aware>false</Parallel-Aware><newline> <Async-Capable>false</Async-Capable><newline> <Startup-Cost>0.00</Startup-Cost><newline> <Total-Cost>19.11</Total-Cost><newline> <Plan-Rows>11</Plan-Rows><newline> <Plan-Width>8</Plan-Width><newline> <Actual-Rows>0</Actual-Rows><newline> <Actual-Loops>1</Actual-Loops><newline> <Workers-Planned>3</Workers-Planned><newline> <Workers-Launched>0</Workers-Launched><newline> <Single-Copy>false</Single-Copy><newline> <Plans><newline> <Plan><newline> <Node-Type>Seq Scan</Node-Type><newline> <Parent-Relationship>Outer</Parent-Relationship><newline> <Parallel-Aware>true</Parallel-Aware><newline> <Async-Capable>false</Async-Capable><newline> <Relation-Name>babel_2843_t1</Relation-Name><newline> <Alias>babel_2843_t1</Alias><newline> <Startup-Cost>0.00</Startup-Cost><newline> <Total-Cost>19.11</Total-Cost><newline> <Plan-Rows>4</Plan-Rows><newline> <Plan-Width>8</Plan-Width><newline> <Actual-Rows>0</Actual-Rows><newline> <Actual-Loops>1</Actual-Loops><newline> <Filter>(b1 = 1)</Filter><newline> <Rows-Removed-by-Filter>0</Rows-Removed-by-Filter><newline> </Plan><newline> </Plans><newline> </Plan><newline> <Triggers><newline> </Triggers><newline></explain>
~~END~~


Expand All @@ -103,7 +103,7 @@ int#!#int

~~START~~
text
{<newline> "Query Text": "select * from babel_2843_t1 where b1 = 1",<newline> "Plan": {<newline> "Node Type": "Gather",<newline> "Parallel Aware": false,<newline> "Async Capable": false,<newline> "Startup Cost": 0.00,<newline> "Total Cost": 19.11,<newline> "Plan Rows": 11,<newline> "Plan Width": 8,<newline> "Actual Rows": 0,<newline> "Actual Loops": 1,<newline> "Workers Planned": 3,<newline> "Workers Launched": 3,<newline> "Single Copy": false,<newline> "Plans": [<newline> {<newline> "Node Type": "Seq Scan",<newline> "Parent Relationship": "Outer",<newline> "Parallel Aware": true,<newline> "Async Capable": false,<newline> "Relation Name": "babel_2843_t1",<newline> "Alias": "babel_2843_t1",<newline> "Startup Cost": 0.00,<newline> "Total Cost": 19.11,<newline> "Plan Rows": 4,<newline> "Plan Width": 8,<newline> "Actual Rows": 0,<newline> "Actual Loops": 4,<newline> "Filter": "(b1 = 1)",<newline> "Rows Removed by Filter": 0,<newline> "Workers": [<newline> ]<newline> }<newline> ]<newline> },<newline> "Triggers": [<newline> ]<newline>}
{<newline> "Query Text": "select * from babel_2843_t1 where b1 = 1",<newline> "Plan": {<newline> "Node Type": "Gather",<newline> "Parallel Aware": false,<newline> "Async Capable": false,<newline> "Startup Cost": 0.00,<newline> "Total Cost": 19.11,<newline> "Plan Rows": 11,<newline> "Plan Width": 8,<newline> "Actual Rows": 0,<newline> "Actual Loops": 1,<newline> "Workers Planned": 3,<newline> "Workers Launched": 0,<newline> "Single Copy": false,<newline> "Plans": [<newline> {<newline> "Node Type": "Seq Scan",<newline> "Parent Relationship": "Outer",<newline> "Parallel Aware": true,<newline> "Async Capable": false,<newline> "Relation Name": "babel_2843_t1",<newline> "Alias": "babel_2843_t1",<newline> "Startup Cost": 0.00,<newline> "Total Cost": 19.11,<newline> "Plan Rows": 4,<newline> "Plan Width": 8,<newline> "Actual Rows": 0,<newline> "Actual Loops": 1,<newline> "Filter": "(b1 = 1)",<newline> "Rows Removed by Filter": 0<newline> }<newline> ]<newline> },<newline> "Triggers": [<newline> ]<newline>}
~~END~~


Expand All @@ -128,7 +128,7 @@ int#!#int

~~START~~
text
Query Text: "select * from babel_2843_t1 where b1 = 1"<newline>Plan: <newline> Node Type: "Gather"<newline> Parallel Aware: false<newline> Async Capable: false<newline> Startup Cost: 0.00<newline> Total Cost: 19.11<newline> Plan Rows: 11<newline> Plan Width: 8<newline> Actual Rows: 0<newline> Actual Loops: 1<newline> Workers Planned: 3<newline> Workers Launched: 3<newline> Single Copy: false<newline> Plans: <newline> - Node Type: "Seq Scan"<newline> Parent Relationship: "Outer"<newline> Parallel Aware: true<newline> Async Capable: false<newline> Relation Name: "babel_2843_t1"<newline> Alias: "babel_2843_t1"<newline> Startup Cost: 0.00<newline> Total Cost: 19.11<newline> Plan Rows: 4<newline> Plan Width: 8<newline> Actual Rows: 0<newline> Actual Loops: 4<newline> Filter: "(b1 = 1)"<newline> Rows Removed by Filter: 0<newline> Workers: <newline>Triggers:
Query Text: "select * from babel_2843_t1 where b1 = 1"<newline>Plan: <newline> Node Type: "Gather"<newline> Parallel Aware: false<newline> Async Capable: false<newline> Startup Cost: 0.00<newline> Total Cost: 19.11<newline> Plan Rows: 11<newline> Plan Width: 8<newline> Actual Rows: 0<newline> Actual Loops: 1<newline> Workers Planned: 3<newline> Workers Launched: 0<newline> Single Copy: false<newline> Plans: <newline> - Node Type: "Seq Scan"<newline> Parent Relationship: "Outer"<newline> Parallel Aware: true<newline> Async Capable: false<newline> Relation Name: "babel_2843_t1"<newline> Alias: "babel_2843_t1"<newline> Startup Cost: 0.00<newline> Total Cost: 19.11<newline> Plan Rows: 4<newline> Plan Width: 8<newline> Actual Rows: 0<newline> Actual Loops: 1<newline> Filter: "(b1 = 1)"<newline> Rows Removed by Filter: 0<newline>Triggers:
~~END~~


Expand Down Expand Up @@ -193,8 +193,8 @@ text
Query Text: select * from babel_2843_t1
Gather (cost=0.00..17.29 rows=2260 width=8) (actual rows=2 loops=1)
Workers Planned: 3
Workers Launched: 3
-> Parallel Seq Scan on babel_2843_t1 (cost=0.00..17.29 rows=729 width=8) (actual rows=0 loops=4)
Workers Launched: 0
-> Parallel Seq Scan on babel_2843_t1 (cost=0.00..17.29 rows=729 width=8) (actual rows=2 loops=1)
~~END~~

~~START~~
Expand All @@ -207,8 +207,8 @@ text
Query Text: select * from babel_2843_t2
Gather (cost=0.00..17.29 rows=2260 width=8) (actual rows=1 loops=1)
Workers Planned: 3
Workers Launched: 3
-> Parallel Seq Scan on babel_2843_t2 (cost=0.00..17.29 rows=729 width=8) (actual rows=0 loops=4)
Workers Launched: 0
-> Parallel Seq Scan on babel_2843_t2 (cost=0.00..17.29 rows=729 width=8) (actual rows=1 loops=1)
~~END~~


Expand Down Expand Up @@ -239,10 +239,10 @@ text
Query Text: select * from babel_2843_t1 where a1 = "@param"
Gather (cost=0.00..19.11 rows=11 width=8) (actual rows=1 loops=1)
Workers Planned: 3
Workers Launched: 3
-> Parallel Seq Scan on babel_2843_t1 (cost=0.00..19.11 rows=4 width=8) (actual rows=0 loops=4)
Workers Launched: 0
-> Parallel Seq Scan on babel_2843_t1 (cost=0.00..19.11 rows=4 width=8) (actual rows=1 loops=1)
Filter: (a1 = 1)
Rows Removed by Filter: 0
Rows Removed by Filter: 2
~~END~~

drop procedure babel_2843_proc;
Expand Down Expand Up @@ -362,7 +362,7 @@ text
Query Text: select 1
Gather (cost=0.00..0.01 rows=1 width=4) (actual rows=1 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Result (cost=0.00..0.01 rows=1 width=4) (actual rows=1 loops=1)
~~END~~
Expand All @@ -388,10 +388,10 @@ text
Query Text: select * from babel_2843_t1 where a1 = "@param"
Gather (cost=0.00..19.11 rows=11 width=8) (actual rows=1 loops=1)
Workers Planned: 3
Workers Launched: 3
-> Parallel Seq Scan on babel_2843_t1 (cost=0.00..19.11 rows=4 width=8) (actual rows=0 loops=4)
Workers Launched: 0
-> Parallel Seq Scan on babel_2843_t1 (cost=0.00..19.11 rows=4 width=8) (actual rows=1 loops=1)
Filter: (a1 = 2)
Rows Removed by Filter: 0
Rows Removed by Filter: 2
~~END~~


Expand Down
2 changes: 1 addition & 1 deletion test/JDBC/expected/parallel_query/BABEL-3248.out
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ text
Query Text: select 1
Gather (actual rows=1 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Result (actual rows=1 loops=1)
~~END~~
Expand Down
18 changes: 9 additions & 9 deletions test/JDBC/expected/parallel_query/BABEL_3571.out
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ text
Query Text: SELECT * FROM babel_3571_1 ORDER BY id1
Gather (actual rows=5 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan using babel_3571_1_id1_key on babel_3571_1 (actual rows=5 loops=1)
~~END~~
Expand All @@ -242,7 +242,7 @@ text
Query Text: SELECT * FROM babel_3571_2 ORDER BY id1
Gather (actual rows=5 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan using babel_3571_2_id1_id2_key on babel_3571_2 (actual rows=5 loops=1)
~~END~~
Expand All @@ -263,7 +263,7 @@ text
Query Text: SELECT * FROM babel_3571_3 ORDER BY id1
Gather (actual rows=5 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan using babel_3571_3_unique_idxbabel_35df79da2a42216884edca5a4a798829ce on babel_3571_3 (actual rows=5 loops=1)
~~END~~
Expand Down Expand Up @@ -481,7 +481,7 @@ text
Query Text: SELECT * FROM babel_3571_1 ORDER BY id1
Gather (actual rows=5 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan using babel_3571_1_id1_key on babel_3571_1 (actual rows=5 loops=1)
~~END~~
Expand All @@ -502,7 +502,7 @@ text
Query Text: SELECT * FROM babel_3571_2 ORDER BY id1
Gather (actual rows=5 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan using babel_3571_2_id1_id2_key on babel_3571_2 (actual rows=5 loops=1)
~~END~~
Expand All @@ -524,7 +524,7 @@ text
Query Text: SELECT * FROM babel_3571_3 ORDER BY id1
Gather (actual rows=6 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan Backward using babel_3571_3_unique_idx on babel_3571_3 (actual rows=6 loops=1)
~~END~~
Expand Down Expand Up @@ -790,7 +790,7 @@ text
Query Text: SELECT * FROM babel_3571_1 ORDER BY id1
Gather (actual rows=5 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan using babel_3571_1_id1_key on babel_3571_1 (actual rows=5 loops=1)
~~END~~
Expand All @@ -811,7 +811,7 @@ text
Query Text: SELECT * FROM babel_3571_2 ORDER BY id1
Gather (actual rows=5 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan using babel_3571_2_id1_key on babel_3571_2 (actual rows=5 loops=1)
~~END~~
Expand All @@ -832,7 +832,7 @@ text
Query Text: SELECT * FROM babel_3571_3 ORDER BY id1
Gather (actual rows=5 loops=1)
Workers Planned: 1
Workers Launched: 1
Workers Launched: 0
Single Copy: true
-> Index Scan using babel_3571_3_unique_idxbabel_35df79da2a42216884edca5a4a798829ce on babel_3571_3 (actual rows=5 loops=1)
~~END~~
Expand Down
Loading

0 comments on commit 3fb8a8a

Please sign in to comment.