From 3a6c7ff9f703c56b9f05ce88f961dccf76e38600 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 2 Jan 2024 13:53:21 +0000 Subject: [PATCH 01/15] TEST PR From abfc0faeb5e54a2d60d16beb8e899f9aeb546e74 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 2 Jan 2024 14:05:44 +0000 Subject: [PATCH 02/15] update branch naem Signed-off-by: Sandeep Kumawat --- .github/composite-actions/build-modified-postgres/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index 4310a40762..c04f51f7c3 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -31,7 +31,7 @@ runs: if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then if [[ ${{inputs.engine_branch}} == "latest" ]]; then - ENGINE_BRANCH=$GITHUB_HEAD_REF + ENGINE_BRANCH=BABEL_4_X_DEV__PG_16_X else ENGINE_BRANCH=${{inputs.engine_branch}} fi From eb622e7030044e9347837fbdc6082fa5f7e493a4 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 2 Jan 2024 14:14:09 +0000 Subject: [PATCH 03/15] testt Signed-off-by: Sandeep Kumawat --- .github/composite-actions/build-extensions/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/composite-actions/build-extensions/action.yml b/.github/composite-actions/build-extensions/action.yml index 88202732cf..9c4703990e 100644 --- a/.github/composite-actions/build-extensions/action.yml +++ b/.github/composite-actions/build-extensions/action.yml @@ -7,7 +7,7 @@ inputs: extension_branch: description: 'Extension Branch name which needs to checkout first' required: no - default: 'not_specified' + default: 'BABEL_4_X_DEV' runs: using: "composite" From 8b7ad254fe6ac65e530497e933a4b64e5e07b0e3 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 2 Jan 2024 14:25:27 +0000 Subject: [PATCH 04/15] Revert "testt" This reverts commit eb622e7030044e9347837fbdc6082fa5f7e493a4. --- .github/composite-actions/build-extensions/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/composite-actions/build-extensions/action.yml b/.github/composite-actions/build-extensions/action.yml index 9c4703990e..88202732cf 100644 --- a/.github/composite-actions/build-extensions/action.yml +++ b/.github/composite-actions/build-extensions/action.yml @@ -7,7 +7,7 @@ inputs: extension_branch: description: 'Extension Branch name which needs to checkout first' required: no - default: 'BABEL_4_X_DEV' + default: 'not_specified' runs: using: "composite" From 0339cb5cb2c6687d20be852f6c484d43d4f76b03 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 2 Jan 2024 14:25:37 +0000 Subject: [PATCH 05/15] Revert "update branch naem" This reverts commit abfc0faeb5e54a2d60d16beb8e899f9aeb546e74. --- .github/composite-actions/build-modified-postgres/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/composite-actions/build-modified-postgres/action.yml b/.github/composite-actions/build-modified-postgres/action.yml index c04f51f7c3..4310a40762 100644 --- a/.github/composite-actions/build-modified-postgres/action.yml +++ b/.github/composite-actions/build-modified-postgres/action.yml @@ -31,7 +31,7 @@ runs: if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then if [[ ${{inputs.engine_branch}} == "latest" ]]; then - ENGINE_BRANCH=BABEL_4_X_DEV__PG_16_X + ENGINE_BRANCH=$GITHUB_HEAD_REF else ENGINE_BRANCH=${{inputs.engine_branch}} fi From 2ec92697f6bbd1b229a944983b18135b75f6fab5 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 2 Jan 2024 14:26:04 +0000 Subject: [PATCH 06/15] update branch name Signed-off-by: Sandeep Kumawat --- .github/scripts/clone_engine_repo.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/clone_engine_repo.conf b/.github/scripts/clone_engine_repo.conf index f0b7d2f5eb..024af54df9 100644 --- a/.github/scripts/clone_engine_repo.conf +++ b/.github/scripts/clone_engine_repo.conf @@ -1 +1 @@ -DEFAULT_BRANCH=BABEL_3_4_STABLE__PG_15_5 +DEFAULT_BRANCH=BABEL_4_X_DEV__PG_16_X From 5b2f40c2ee1dd950fc5f4c223a5db02b7ef66ea4 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Wed, 3 Jan 2024 09:20:35 +0000 Subject: [PATCH 07/15] expected output changed in PG16 Signed-off-by: Sandeep Kumawat --- .../parallel_query/BABEL-328-vu-verify.out | 4 +- .../parallel_query/TestSQLQueries.out | 14 ++--- .../parallel_query/pgr_select_distinct.out | 56 +++++-------------- 3 files changed, 23 insertions(+), 51 deletions(-) diff --git a/test/JDBC/expected/parallel_query/BABEL-328-vu-verify.out b/test/JDBC/expected/parallel_query/BABEL-328-vu-verify.out index 3859fc36de..7c44bd53e1 100644 --- a/test/JDBC/expected/parallel_query/BABEL-328-vu-verify.out +++ b/test/JDBC/expected/parallel_query/BABEL-328-vu-verify.out @@ -28,8 +28,8 @@ Engineering Administration Sales Sales -Marketing Finance +Marketing ~~END~~ @@ -41,8 +41,8 @@ Engineering Administration Sales Sales -Marketing Finance +Marketing ~~END~~ diff --git a/test/JDBC/expected/parallel_query/TestSQLQueries.out b/test/JDBC/expected/parallel_query/TestSQLQueries.out index dda6e46574..d4bf29ac04 100644 --- a/test/JDBC/expected/parallel_query/TestSQLQueries.out +++ b/test/JDBC/expected/parallel_query/TestSQLQueries.out @@ -622,17 +622,17 @@ int#!#int#!#text#!#int SELECT * FROM temp1 LEFT OUTER JOIN temp2 ON temp1.i=temp2.k; ~~START~~ int#!#int#!#text#!#int#!#int -1#!#4#!#one#!##!# 2#!#3#!#two#!#2#!#2 -3#!#2#!#three#!##!# 4#!#1#!#four#!#2#!#4 -5#!#0#!#five#!##!# -6#!#6#!#six#!##!# -7#!#7#!#seven#!##!# -8#!#8#!#eight#!##!# 0#!##!#zero#!##!#0 -#!##!##!##!# #!#0#!#zero#!##!# +#!##!##!##!# +8#!#8#!#eight#!##!# +6#!#6#!#six#!##!# +7#!#7#!#seven#!##!# +5#!#0#!#five#!##!# +1#!#4#!#one#!##!# +3#!#2#!#three#!##!# ~~END~~ diff --git a/test/JDBC/expected/parallel_query/pgr_select_distinct.out b/test/JDBC/expected/parallel_query/pgr_select_distinct.out index b8c205e296..3a9a378670 100644 --- a/test/JDBC/expected/parallel_query/pgr_select_distinct.out +++ b/test/JDBC/expected/parallel_query/pgr_select_distinct.out @@ -117,14 +117,6 @@ int#!#varchar#!#int -- -- Check mentioning same column more than once -- -select set_config('babelfishpg_tsql.explain_verbose', 'on', false); -GO -~~START~~ -text -on -~~END~~ - - select set_config('babelfishpg_tsql.explain_costs', 'off', false); GO ~~START~~ @@ -142,20 +134,14 @@ GO text Query Text: SELECT count(*) FROM (SELECT DISTINCT two, four, two FROM tenk1) ss Aggregate - Output: count(*) -> Unique - Output: tenk1.two, tenk1.four, tenk1.two -> Sort - Output: tenk1.two, tenk1.four, tenk1.two Sort Key: tenk1.two, tenk1.four -> Gather - Output: tenk1.two, tenk1.four, tenk1.two Workers Planned: 4 -> HashAggregate - Output: tenk1.two, tenk1.four, tenk1.two - Group Key: tenk1.two, tenk1.four, tenk1.two - -> Parallel Seq Scan on master_dbo.tenk1 - Output: tenk1.two, tenk1.four, tenk1.two + Group Key: tenk1.two, tenk1.four + -> Parallel Seq Scan on tenk1 ~~END~~ @@ -167,20 +153,14 @@ text Query Text: SELECT count(*) FROM (SELECT DISTINCT two, four, two FROM tenk1) ss Aggregate - Output: count(*) -> Unique - Output: tenk1.two, tenk1.four, tenk1.two -> Sort - Output: tenk1.two, tenk1.four, tenk1.two Sort Key: tenk1.two, tenk1.four -> Gather - Output: tenk1.two, tenk1.four, tenk1.two Workers Planned: 4 -> HashAggregate - Output: tenk1.two, tenk1.four, tenk1.two - Group Key: tenk1.two, tenk1.four, tenk1.two - -> Parallel Seq Scan on master_dbo.tenk1 - Output: tenk1.two, tenk1.four, tenk1.two + Group Key: tenk1.two, tenk1.four + -> Parallel Seq Scan on tenk1 ~~END~~ @@ -230,17 +210,12 @@ GO text Query Text: SELECT DISTINCT g%1000 FROM generate_series(0,9999) g Gather - Output: ((g % 1000)) Workers Planned: 1 Single Copy: true -> Unique - Output: ((g % 1000)) -> Sort - Output: ((g % 1000)) - Sort Key: ((g.g % 1000)) - -> Function Scan on pg_catalog.generate_series g - Output: (g % 1000) - Function Call: generate_series(0, 9999) + Sort Key: ((g % 1000)) + -> Function Scan on generate_series g ~~END~~ @@ -294,15 +269,11 @@ GO text Query Text: SELECT DISTINCT g%1000 FROM generate_series(0,9999) g Gather - Output: ((g % 1000)) Workers Planned: 1 Single Copy: true -> HashAggregate - Output: ((g % 1000)) - Group Key: (g.g % 1000) - -> Function Scan on pg_catalog.generate_series g - Output: (g % 1000) - Function Call: generate_series(0, 9999) + Group Key: (g % 1000) + -> Function Scan on generate_series g ~~END~~ @@ -488,11 +459,12 @@ GO ~~START~~ text Unique - -> Sort - Sort Key: (distinct_func(1)) - -> Gather - Workers Planned: 4 - -> Parallel Seq Scan on tenk1 + -> Gather Merge + Workers Planned: 4 + -> Unique + -> Sort + Sort Key: (distinct_func(1)) + -> Parallel Seq Scan on tenk1 ~~END~~ From 4cc7a60fdb27159226a953d91b92cfa98847d130 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Wed, 3 Jan 2024 13:08:26 +0000 Subject: [PATCH 08/15] test one change Signed-off-by: Sandeep Kumawat --- test/JDBC/parallel_query_jdbc_schedule | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/JDBC/parallel_query_jdbc_schedule b/test/JDBC/parallel_query_jdbc_schedule index 8b62f9c884..2fa2f8285b 100644 --- a/test/JDBC/parallel_query_jdbc_schedule +++ b/test/JDBC/parallel_query_jdbc_schedule @@ -7,13 +7,23 @@ # These tests are crashing/failing with parallel query mode is on. # These tests are hanging in 16.1 with parallel query mode on +# JIRA - BABEL-4668 ignore#!#545_1 + +# JIRA - BABEL-4669 ignore#!#BABEL-3092 + +# JIRA - BABEL-4670 ignore#!#BABEL-SEQUENCE + +# JIRA - BABEL-4671 ignore#!#TestSPPrepare -ignore#!#sp_who-vu-prepare -ignore#!#sp_who-vu-verify -ignore#!#sp_who-vu-cleanup + +# TIME-OUT FAILURE +# ignore#!#sp_who-vu-prepare +# ignore#!#sp_who-vu-verify +# ignore#!#sp_who-vu-cleanup + # Group 1: BABEL-4481 ignore#!#Test-sp_addrolemember-vu-prepare From 883b7b60dca62232569647d4f03b46f7c64d1e1c Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Wed, 3 Jan 2024 13:09:53 +0000 Subject: [PATCH 09/15] revert above change Signed-off-by: Sandeep Kumawat --- test/JDBC/parallel_query_jdbc_schedule | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/JDBC/parallel_query_jdbc_schedule b/test/JDBC/parallel_query_jdbc_schedule index 2fa2f8285b..8607bc38ab 100644 --- a/test/JDBC/parallel_query_jdbc_schedule +++ b/test/JDBC/parallel_query_jdbc_schedule @@ -20,9 +20,9 @@ ignore#!#BABEL-SEQUENCE ignore#!#TestSPPrepare # TIME-OUT FAILURE -# ignore#!#sp_who-vu-prepare -# ignore#!#sp_who-vu-verify -# ignore#!#sp_who-vu-cleanup +ignore#!#sp_who-vu-prepare +ignore#!#sp_who-vu-verify +ignore#!#sp_who-vu-cleanup # Group 1: BABEL-4481 From 599289b3c3b4f46bf21783902931915bc59e280c Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Wed, 3 Jan 2024 13:39:07 +0000 Subject: [PATCH 10/15] empty commit From 3c6a221ee14372573ed65f51cc5e56ec24ce804f Mon Sep 17 00:00:00 2001 From: Dipesh Dhameliya Date: Mon, 8 Jan 2024 11:59:30 +0530 Subject: [PATCH 11/15] Provide flexibility to provide different SLA time for parallel query testing and unblock few more tests for parallel query testing (#2188) This commit introduces two changes: 1. It adds flexibility to provide different SLA time for parallel query testing. User can now use flag sla_for_parallel_query_enforced to specify different SLA time to be considered when tests file runs with parallel query enforced. 2. It unblocks few more tests for parallel query testing Task: BABEL-4392 Signed-off-by: Dipesh Dhameliya --- test/JDBC/README.md | 5 +++-- test/JDBC/input/BABEL-SP_COLUMN_PRIVILEGES.mix | 1 + .../input/errorHandling/TestSimpleErrors.sql | 1 + .../sys-has_perms_by_name-vu-verify.mix | 1 + test/JDBC/input/sp_columns_100.sql | 1 + test/JDBC/parallel_query_jdbc_schedule | 18 ++---------------- .../main/java/com/sqlsamples/batch_run.java | 10 +++++++++- 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/test/JDBC/README.md b/test/JDBC/README.md index 69ef41f32b..546898ef8a 100644 --- a/test/JDBC/README.md +++ b/test/JDBC/README.md @@ -405,11 +405,12 @@ After building the modified PostgreSQL engine and Babelfish extensions using the mvn test ``` 5. If the expected output is different when run in parallel query mode and in normal mode, one can add a different expected output specially for parallel query mode in `expected/parallel_query/` folder. Additionally, one needs to add `-- parallel_query_expected` flag in the corresponding input file. -6. Cleanup all the objects, users, roles and databases created while running the tests: +6. If you want to have different SLA timeout when test runs in parallel query mode then use `-- sla_for_parallel_query_enforced` flag in the corresponding input file. +7. Cleanup all the objects, users, roles and databases created while running the tests: ```bash ./cleanup.sh ``` -7. Please note that when you have completed testing with parallel query mode enabled, you should unset the `isParallelQueryMode` environment variable that was previously set to `true`. This ensures that all tests run in the normal Babelfish mode (without parallel query): +8. Please note that when you have completed testing with parallel query mode enabled, you should unset the `isParallelQueryMode` environment variable that was previously set to `true`. This ensures that all tests run in the normal Babelfish mode (without parallel query): ```bash unset isParallelQueryMode diff --git a/test/JDBC/input/BABEL-SP_COLUMN_PRIVILEGES.mix b/test/JDBC/input/BABEL-SP_COLUMN_PRIVILEGES.mix index d03354f012..26a3c005a9 100644 --- a/test/JDBC/input/BABEL-SP_COLUMN_PRIVILEGES.mix +++ b/test/JDBC/input/BABEL-SP_COLUMN_PRIVILEGES.mix @@ -1,4 +1,5 @@ -- sla 10000 +-- sla_for_parallel_query_enforced 15000 -- tsql CREATE DATABASE db1 GO diff --git a/test/JDBC/input/errorHandling/TestSimpleErrors.sql b/test/JDBC/input/errorHandling/TestSimpleErrors.sql index 95832cfe32..8d103d4f0e 100644 --- a/test/JDBC/input/errorHandling/TestSimpleErrors.sql +++ b/test/JDBC/input/errorHandling/TestSimpleErrors.sql @@ -1,3 +1,4 @@ +-- sla_for_parallel_query_enforced 100000 CREATE TABLE simpleErrorTable (a varchar(15) UNIQUE NOT NULL, b nvarchar(25), c int PRIMARY KEY, d char(15) DEFAULT 'Whoops!', e nchar(25), f datetime, g numeric(4,1) CHECK (g >= 103.5)) GO diff --git a/test/JDBC/input/functions/sys-has_perms_by_name-vu-verify.mix b/test/JDBC/input/functions/sys-has_perms_by_name-vu-verify.mix index 46dfb6b743..288b7ac3e3 100644 --- a/test/JDBC/input/functions/sys-has_perms_by_name-vu-verify.mix +++ b/test/JDBC/input/functions/sys-has_perms_by_name-vu-verify.mix @@ -1,3 +1,4 @@ +-- sla_for_parallel_query_enforced 70000 -- tsql -- reset the login password ALTER LOGIN user_perms_by_name WITH PASSWORD='test'; diff --git a/test/JDBC/input/sp_columns_100.sql b/test/JDBC/input/sp_columns_100.sql index 0f222c21d3..a0e9e847e5 100644 --- a/test/JDBC/input/sp_columns_100.sql +++ b/test/JDBC/input/sp_columns_100.sql @@ -1,3 +1,4 @@ +-- sla_for_parallel_query_enforced 55000 -- create tables with most of the datatypes create table var(a char(10), b nchar(9), c nvarchar(8), d varchar(7), e text, f ntext, g varbinary(10), h binary(9), i image, j xml) go diff --git a/test/JDBC/parallel_query_jdbc_schedule b/test/JDBC/parallel_query_jdbc_schedule index 8607bc38ab..fcf3848dcb 100644 --- a/test/JDBC/parallel_query_jdbc_schedule +++ b/test/JDBC/parallel_query_jdbc_schedule @@ -51,27 +51,13 @@ ignore#!#Test-sp_addrolemember-dep-vu-verify ignore#!#Test-sp_droprolemember-dep-vu-verify ignore#!#babel_table_type -# These test should not ger run in parallel query +# These test should not get ran in parallel query ignore#!#BABEL-1363 # Taking too much time to complete. (TIME-OUT FAILURES) ignore#!#BABEL-SP_TABLE_PRIVILIGES-vu-verify -ignore#!#BABEL-SP_COLUMNS_MANAGED-dep-vu-verify -ignore#!#BABEL-SP_TABLES -ignore#!#ISC-Domains-vu-verify -ignore#!#Test-sp_rename-vu-prepare -ignore#!#Test-sp_rename-vu-verify -ignore#!#Test-sp_rename-vu-cleanup ignore#!#BABEL-3013 -ignore#!#BABEL-SP_COLUMN_PRIVILEGES ignore#!#BABEL-SP_TABLE_PRIVILEGES ignore#!#ISC-Columns-vu-verify -ignore#!#TestSimpleErrors -ignore#!#ISC-Views -ignore#!#TestSimpleErrorsWithXactAbort -ignore#!#BABEL-2513 -ignore#!#TestDatetime-numeric-representation-vu-prepare -ignore#!#TestDatetime-numeric-representation-vu-verify ignore#!#four-part-names-vu-verify -ignore#!#sp_columns_100 -ignore#!#sys-has_perms_by_name-vu-verify +#ignore#!#sys-has_perms_by_name-vu-verify diff --git a/test/JDBC/src/main/java/com/sqlsamples/batch_run.java b/test/JDBC/src/main/java/com/sqlsamples/batch_run.java index 20406176ae..6603495c4d 100644 --- a/test/JDBC/src/main/java/com/sqlsamples/batch_run.java +++ b/test/JDBC/src/main/java/com/sqlsamples/batch_run.java @@ -24,6 +24,7 @@ static void batch_run_sql(Connection con_bbl, BufferedWriter bw, String testFile boolean tsqlDialect = false; boolean psqlDialect = false; boolean customSLA = false; + boolean customSLAWithParallelQueryEnforced = false; if (testFilePath.contains(".mix")) { isCrossDialectFile = true; @@ -273,7 +274,14 @@ static void batch_run_sql(Connection con_bbl, BufferedWriter bw, String testFile } } else { customSLA = strLine.toLowerCase().startsWith("-- sla"); - if (customSLA){ + if (!customSLAWithParallelQueryEnforced && customSLA){ + String[] tokens=strLine.split(" "); + sla = Long.parseLong(tokens[2]); + sla = sla*(1000000L); + continue; + } + customSLAWithParallelQueryEnforced = isParallelQueryMode && strLine.toLowerCase().startsWith("-- sla_for_parallel_query_enforced"); + if (customSLAWithParallelQueryEnforced){ String[] tokens=strLine.split(" "); sla = Long.parseLong(tokens[2]); sla = sla*(1000000L); From 0fddace716f64ec1c74eb90e59f5bf9399cc758f Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Mon, 8 Jan 2024 15:09:50 +0000 Subject: [PATCH 12/15] minor fix Signed-off-by: Sandeep Kumawat --- test/JDBC/parallel_query_jdbc_schedule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/JDBC/parallel_query_jdbc_schedule b/test/JDBC/parallel_query_jdbc_schedule index 9e5324e4fc..2e3a6f1203 100644 --- a/test/JDBC/parallel_query_jdbc_schedule +++ b/test/JDBC/parallel_query_jdbc_schedule @@ -19,7 +19,7 @@ ignore#!#BABEL-SEQUENCE # JIRA - BABEL-4671 ignore#!#TestSPPrepare -# TIME-OUT FAILURE +# Hangs with unknown cause ignore#!#sp_who-vu-prepare ignore#!#sp_who-vu-verify ignore#!#sp_who-vu-cleanup From 5ffa8108f419972098e9ed8a0a3081d135926f6c Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 9 Jan 2024 08:23:53 +0000 Subject: [PATCH 13/15] add order by clause in case of output row order changes in parallel query Signed-off-by: Sandeep Kumawat --- test/JDBC/expected/BABEL-328-vu-verify.out | 16 +- test/JDBC/expected/TestSQLQueries.out | 20 +- .../parallel_query/BABEL-328-vu-verify.out | 176 ------------------ test/JDBC/input/BABEL-328-vu-verify.sql | 5 +- test/JDBC/input/sqlBatch/TestSQLQueries.txt | 9 +- test/JDBC/jdbc_schedule | 3 +- 6 files changed, 26 insertions(+), 203 deletions(-) delete mode 100644 test/JDBC/expected/parallel_query/BABEL-328-vu-verify.out diff --git a/test/JDBC/expected/BABEL-328-vu-verify.out b/test/JDBC/expected/BABEL-328-vu-verify.out index 7c44bd53e1..75ab402210 100644 --- a/test/JDBC/expected/BABEL-328-vu-verify.out +++ b/test/JDBC/expected/BABEL-328-vu-verify.out @@ -20,29 +20,29 @@ Sales ~~END~~ -SELECT * FROM babel_328_vu_v3 +SELECT * FROM babel_328_vu_v3 ORDER BY NAME GO ~~START~~ varchar -Engineering Administration -Sales -Sales +Engineering Finance Marketing +Sales +Sales ~~END~~ -SELECT * FROM babel_328_vu_v4 +SELECT * FROM babel_328_vu_v4 ORDER BY NAME GO ~~START~~ varchar -Engineering Administration -Sales -Sales +Engineering Finance Marketing +Sales +Sales ~~END~~ diff --git a/test/JDBC/expected/TestSQLQueries.out b/test/JDBC/expected/TestSQLQueries.out index fe4649c3f0..1b76085ff1 100644 --- a/test/JDBC/expected/TestSQLQueries.out +++ b/test/JDBC/expected/TestSQLQueries.out @@ -593,25 +593,25 @@ int#!#int#!#text#!#int#!#int #18 INNER JOIN -SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 INNER JOIN temp2 ON temp1.i=temp2.i; +SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 INNER JOIN temp2 ON temp1.i=temp2.i ORDER BY temp1.i; ~~START~~ int#!#int#!#text#!#int 0#!##!#zero#!# 1#!#4#!#one#!#-1 -2#!#3#!#two#!#2 2#!#3#!#two#!#4 +2#!#3#!#two#!#2 3#!#2#!#three#!#-3 5#!#0#!#five#!#-5 5#!#0#!#five#!#-5 ~~END~~ -SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 JOIN temp2 ON temp1.i=temp2.i; +SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 JOIN temp2 ON temp1.i=temp2.i ORDER BY temp1.i; ~~START~~ int#!#int#!#text#!#int 0#!##!#zero#!# 1#!#4#!#one#!#-1 -2#!#3#!#two#!#2 2#!#3#!#two#!#4 +2#!#3#!#two#!#2 3#!#2#!#three#!#-3 5#!#0#!#five#!#-5 5#!#0#!#five#!#-5 @@ -619,9 +619,11 @@ int#!#int#!#text#!#int #19 LEFT JOIN -SELECT * FROM temp1 LEFT OUTER JOIN temp2 ON temp1.i=temp2.k; +SELECT * FROM temp1 LEFT OUTER JOIN temp2 ON temp1.i=temp2.k ORDER BY temp1.i; ~~START~~ int#!#int#!#text#!#int#!#int +#!#0#!#zero#!##!# +#!##!##!##!# 0#!##!#zero#!##!#0 1#!#4#!#one#!##!# 2#!#3#!#two#!#2#!#2 @@ -631,15 +633,15 @@ int#!#int#!#text#!#int#!#int 6#!#6#!#six#!##!# 7#!#7#!#seven#!##!# 8#!#8#!#eight#!##!# -#!##!##!##!# -#!#0#!#zero#!##!# ~~END~~ #20 RIGHT JOIN -SELECT * FROM temp1 RIGHT OUTER JOIN temp2 ON temp1.i=temp2.i; +SELECT * FROM temp1 RIGHT OUTER JOIN temp2 ON temp1.i=temp2.i ORDER BY temp1.i, temp2.k; ~~START~~ int#!#int#!#text#!#int#!#int +#!##!##!##!# +#!##!##!##!#0 0#!##!#zero#!#0#!# 1#!#4#!#one#!#1#!#-1 2#!#3#!#two#!#2#!#2 @@ -647,8 +649,6 @@ int#!#int#!#text#!#int#!#int 3#!#2#!#three#!#3#!#-3 5#!#0#!#five#!#5#!#-5 5#!#0#!#five#!#5#!#-5 -#!##!##!##!# -#!##!##!##!#0 ~~END~~ diff --git a/test/JDBC/expected/parallel_query/BABEL-328-vu-verify.out b/test/JDBC/expected/parallel_query/BABEL-328-vu-verify.out deleted file mode 100644 index 7c44bd53e1..0000000000 --- a/test/JDBC/expected/parallel_query/BABEL-328-vu-verify.out +++ /dev/null @@ -1,176 +0,0 @@ -SELECT * FROM babel_328_vu_v1 -GO -~~START~~ -varchar -Engineering -Administration -Sales -Sales -~~END~~ - - -SELECT * FROM babel_328_vu_v2 -GO -~~START~~ -varchar -Engineering -Administration -Sales -Sales -~~END~~ - - -SELECT * FROM babel_328_vu_v3 -GO -~~START~~ -varchar -Engineering -Administration -Sales -Sales -Finance -Marketing -~~END~~ - - -SELECT * FROM babel_328_vu_v4 -GO -~~START~~ -varchar -Engineering -Administration -Sales -Sales -Finance -Marketing -~~END~~ - - -EXEC babel_328_vu_p1 -GO -~~START~~ -int#!#varchar#!#int#!#varchar#!#varchar#!#int -1#!#Engineering#!#1#!#Orlando#!#Gee#!#1 -2#!#Administration#!#2#!#Keith#!#Harris#!#2 -3#!#Sales#!#3#!#Donna#!#Carreras#!#3 -3#!#Sales#!#4#!#Janet#!#Gates#!#3 -~~END~~ - - -EXEC babel_328_vu_p2 -GO -~~START~~ -int#!#varchar#!#int#!#varchar#!#varchar#!#int -3#!#Sales#!#3#!#Donna#!#Carreras#!#3 -3#!#Sales#!#4#!#Janet#!#Gates#!#3 -~~END~~ - - -EXEC babel_328_vu_p3 -GO -~~START~~ -int#!#varchar#!#int#!#varchar#!#varchar#!#int -1#!#Engineering#!#1#!#Orlando#!#Gee#!#1 -2#!#Administration#!#2#!#Keith#!#Harris#!#2 -3#!#Sales#!#3#!#Donna#!#Carreras#!#3 -3#!#Sales#!#4#!#Janet#!#Gates#!#3 -4#!#Marketing#!##!##!##!# -5#!#Finance#!##!##!##!# -~~END~~ - - -EXEC babel_328_vu_p4 -GO -~~START~~ -int#!#varchar#!#int#!#varchar#!#varchar#!#int -3#!#Sales#!#3#!#Donna#!#Carreras#!#3 -3#!#Sales#!#4#!#Janet#!#Gates#!#3 -~~END~~ - - -SELECT * FROM babel_328_vu_v5 -GO -~~START~~ -int#!#int#!#int#!#int#!#int#!#int -1#!#1#!#3#!#3#!#5#!#5 -1#!#1#!#3#!#3#!#6#!#6 -1#!#1#!#4#!#4#!#5#!#5 -1#!#1#!#4#!#4#!#6#!#6 -2#!#2#!#3#!#3#!#5#!#5 -2#!#2#!#3#!#3#!#6#!#6 -2#!#2#!#4#!#4#!#5#!#5 -2#!#2#!#4#!#4#!#6#!#6 -~~END~~ - - -SELECT * FROM babel_328_vu_v6 -GO -~~START~~ -int#!#int#!#int#!#int#!#int#!#int -1#!#1#!#3#!#3#!#5#!#5 -1#!#1#!#4#!#4#!#5#!#5 -1#!#1#!#3#!#3#!#6#!#6 -1#!#1#!#4#!#4#!#6#!#6 -2#!#2#!#3#!#3#!#5#!#5 -2#!#2#!#4#!#4#!#5#!#5 -2#!#2#!#3#!#3#!#6#!#6 -2#!#2#!#4#!#4#!#6#!#6 -~~END~~ - - -SELECT * FROM babel_328_vu_f2() -GO -~~START~~ -datetime -2021-12-12 00:00:00.0 -~~END~~ - - ---These calls should return an error -SELECT * FROM babel_328_vu_t1 D -CROSS babel_328_vu_t2 E -GO -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: syntax error near 'babel_328_vu_t2' at line 3 and character position 6)~~ - - -SELECT * FROM babel_328_vu_t1 D -OUTER babel_328_vu_t2 E -GO -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: syntax error near 'babel_328_vu_t2' at line 2 and character position 6)~~ - - -SELECT * FROM babel_328_vu_t1 d -CROSS APPLY (SELECT * FROM babel_328_vu_t2) -GO -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: subquery in APPLY must have an alias)~~ - - -SELECT * FROM babel_328_vu_t1 d -OUTER APPLY (SELECT * FROM babel_328_vu_t2) -GO -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: subquery in APPLY must have an alias)~~ - - -SELECT * FROM babel_328_vu_t1 d -CROSS APPLY (VALUES (3,3),(4,4)) -GO -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: VALUES in APPLY must have an alias)~~ - - -SELECT * FROM babel_328_vu_t1 d -OUTER APPLY (VALUES (3,3),(4,4)) -GO -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: VALUES in APPLY must have an alias)~~ - diff --git a/test/JDBC/input/BABEL-328-vu-verify.sql b/test/JDBC/input/BABEL-328-vu-verify.sql index f58e8cd99a..e587a5d7b2 100644 --- a/test/JDBC/input/BABEL-328-vu-verify.sql +++ b/test/JDBC/input/BABEL-328-vu-verify.sql @@ -1,14 +1,13 @@ --- parallel_query_expected SELECT * FROM babel_328_vu_v1 GO SELECT * FROM babel_328_vu_v2 GO -SELECT * FROM babel_328_vu_v3 +SELECT * FROM babel_328_vu_v3 ORDER BY NAME GO -SELECT * FROM babel_328_vu_v4 +SELECT * FROM babel_328_vu_v4 ORDER BY NAME GO EXEC babel_328_vu_p1 diff --git a/test/JDBC/input/sqlBatch/TestSQLQueries.txt b/test/JDBC/input/sqlBatch/TestSQLQueries.txt index e9b53ce887..e05f6d742d 100644 --- a/test/JDBC/input/sqlBatch/TestSQLQueries.txt +++ b/test/JDBC/input/sqlBatch/TestSQLQueries.txt @@ -1,4 +1,3 @@ --- parallel_query_expected #1 CREATE TABLE with primary and unique keyword EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_unique_constraint', 'ignore'; CREATE TABLE tmp(a int PRIMARY KEY, b int UNIQUE); @@ -193,14 +192,14 @@ INSERT INTO temp2 VALUES (NULL, 0); SELECT * FROM temp1 CROSS JOIN temp2; #18 INNER JOIN -SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 INNER JOIN temp2 ON temp1.i=temp2.i; -SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 JOIN temp2 ON temp1.i=temp2.i; +SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 INNER JOIN temp2 ON temp1.i=temp2.i ORDER BY temp1.i; +SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 JOIN temp2 ON temp1.i=temp2.i ORDER BY temp1.i; #19 LEFT JOIN -SELECT * FROM temp1 LEFT OUTER JOIN temp2 ON temp1.i=temp2.k; +SELECT * FROM temp1 LEFT OUTER JOIN temp2 ON temp1.i=temp2.k ORDER BY temp1.i; #20 RIGHT JOIN -SELECT * FROM temp1 RIGHT OUTER JOIN temp2 ON temp1.i=temp2.i; +SELECT * FROM temp1 RIGHT OUTER JOIN temp2 ON temp1.i=temp2.i ORDER BY temp1.i, temp2.k; #21 FULL OUTER JOIN SELECT * FROM temp1,temp2; diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index ea926908f7..c893e95967 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -8,7 +8,8 @@ # new line # 6. If you want the framework to not run certain files, use: ignore#!# -all +# all +TestSQLQueries # BABEL-SP_FKEYS test is very slow and causing github action timeout. From 6283631fb150313a60e25781ebc55bc707beb836 Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 9 Jan 2024 08:26:18 +0000 Subject: [PATCH 14/15] fix Signed-off-by: Sandeep Kumawat --- .../parallel_query/TestSQLQueries.out | 839 ------------------ 1 file changed, 839 deletions(-) delete mode 100644 test/JDBC/expected/parallel_query/TestSQLQueries.out diff --git a/test/JDBC/expected/parallel_query/TestSQLQueries.out b/test/JDBC/expected/parallel_query/TestSQLQueries.out deleted file mode 100644 index d4bf29ac04..0000000000 --- a/test/JDBC/expected/parallel_query/TestSQLQueries.out +++ /dev/null @@ -1,839 +0,0 @@ -#1 CREATE TABLE with primary and unique keyword -EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_unique_constraint', 'ignore'; -CREATE TABLE tmp(a int PRIMARY KEY, b int UNIQUE); -INSERT INTO tmp(a,b) values(1,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) values(2,2); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -~~END~~ - -DROP TABLE tmp; - -#2 2 table with foreign key relation -#CREATE TABLE tmp1(b int PRIMARY KEY); -#CREATE TABLE tmp2(a int PRIMARY KEY, b int FOREIGN KEY REFERENCES tmp1(b)); -#INSERT INTO tmp1(b) VALUES (1); -#INSERT INTO tmp2(a,b) values(1,1); -#SELECT * FROM tmp1; -#SELECT * FROM tmp2; -#DROP TABLE tmp2; -#DROP TABLE tmp1; - -#3 Repeated #2 with CONSTRAINT keyword -#CREATE TABLE tmp1(b int PRIMARY KEY); -#CREATE TABLE tmp2(a int, b int, PRIMARY KEY(a), CONSTRAINT FK_tmp FOREIGN KEY (b) REFERENCES tmp1(b)); -#INSERT INTO tmp1(b) VALUES (1); -#INSERT INTO tmp2(a,b) values(1,1); -#SELECT * FROM tmp1; -#SELECT * FROM tmp2; -#DROP TABLE tmp2; -#DROP TABLE tmp1; - -#4 CREATE TABLE with NOT NULL column -CREATE TABLE tmp(a int PRIMARY KEY,b int NOT NULL); -INSERT INTO tmp(a,b) values(1,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) values(2,1); -~~ROW COUNT: 1~~ - -#INSERT INTO tmp(a,b) values(2,NULL); -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#1 -~~END~~ - -DROP TABLE tmp; - -#5 INSERTION and DELETION -CREATE TABLE tmp(a int PRIMARY KEY); -INSERT INTO tmp(a) VALUES(1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a) VALUES(2); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a) VALUES(3); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a) VALUES(4); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a) VALUES(5); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int -1 -2 -3 -4 -5 -~~END~~ - -DELETE FROM tmp WHERE a>2; -~~ROW COUNT: 3~~ - -SELECT * FROM tmp; -~~START~~ -int -1 -2 -~~END~~ - -DROP TABLE tmp; - -#6 IS NOT NULL condition in WHERE clause -CREATE TABLE tmp(a int PRIMARY KEY,b int); -INSERT INTO tmp(a,b) values(1,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) values(2,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) values(3,NULL); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) values(4,NULL); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp WHERE b IS NOT NULL; -~~START~~ -int#!#int -1#!#1 -2#!#1 -~~END~~ - -DROP TABLE tmp; - -#7 Add new column using ALTER TABLE -CREATE TABLE tmp(a int PRIMARY KEY); -INSERT INTO tmp(a) VALUES(1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a) VALUES(2); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int -1 -2 -~~END~~ - -ALTER TABLE tmp ADD b VARCHAR(20) NULL; -SELECT * FROM tmp; -~~START~~ -int#!#varchar -1#!# -2#!# -~~END~~ - -INSERT INTO tmp(a,b) VALUES(4,'Dipesh'); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(5,' Dipesh'); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#varchar -1#!# -2#!# -4#!#Dipesh -5#!# Dipesh -~~END~~ - -DROP TABLE tmp; - -#8 Repeated #8 with default value for newly added col -CREATE TABLE tmp(a int PRIMARY KEY); -INSERT INTO tmp(a) VALUES(1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a) VALUES(2); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int -1 -2 -~~END~~ - -ALTER TABLE tmp ADD b VARCHAR(20) DEFAULT 'Dipesj'; -SELECT * FROM tmp; -~~START~~ -int#!#varchar -1#!#Dipesj -2#!#Dipesj -~~END~~ - -INSERT INTO tmp(a,b) VALUES(4,'Dipesh'); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(5,' Dipesh'); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#varchar -1#!#Dipesj -2#!#Dipesj -4#!#Dipesh -5#!# Dipesh -~~END~~ - -DROP TABLE tmp; - -#9 Change datatype of existing column using ALTER TABLE -CREATE TABLE tmp(a int PRIMARY KEY,b int); -INSERT INTO tmp(a,b) VALUES(1,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(2,2); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -~~END~~ - -ALTER TABLE tmp ALTER COLUMN b VARCHAR(10); -SELECT * FROM tmp; -~~START~~ -int#!#varchar -1#!#1 -2#!#2 -~~END~~ - -INSERT INTO tmp(a,b) VALUES(4,'Dipesh'); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(5,' Dipesh'); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#varchar -1#!#1 -2#!#2 -4#!#Dipesh -5#!# Dipesh -~~END~~ - -DROP TABLE tmp; - -#10 UPDATE TABLE with fancy condition -CREATE TABLE tmp(a int PRIMARY KEY,b int); -INSERT INTO tmp(a,b) VALUES(1,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(2,2); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(3,3); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(4,4); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(5,5); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -3#!#3 -4#!#4 -5#!#5 -~~END~~ - -UPDATE tmp SET b=b+1 WHERE b>2; -~~ROW COUNT: 3~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -3#!#4 -4#!#5 -5#!#6 -~~END~~ - -DROP TABLE tmp; - -#11 DROP some column using ALTER TABLE -CREATE TABLE tmp(a int PRIMARY KEY,b int); -INSERT INTO tmp(a,b) VALUES(1,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(2,2); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(3,3); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(4,4); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(5,5); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -3#!#3 -4#!#4 -5#!#5 -~~END~~ - -#ALTER TABLE tmp DROP COLUMN b; -#INSERT INTO tmp(a) values (6); -#SELECT * FROM tmp; -DROP TABLE tmp; - -#12 CREATE TABLE with fancy constraint -CREATE TABLE tmp(a int PRIMARY KEY CHECK (a>10),b int); -INSERT INTO tmp(a,b) VALUES(11,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(12,2); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(13,3); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(14,4); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(15,5); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -11#!#1 -12#!#2 -13#!#3 -14#!#4 -15#!#5 -~~END~~ - -DROP TABLE tmp; - -#CREATE PROCEDURE tmp AS -#BEGIN -# CREATE TABLE dip(a int PRIMARY KEY CHECK (a>10),b int); -# INSERT INTO dip(a,b) VALUES(11,1); -# INSERT INTO dip(a,b) VALUES(12,2); -# INSERT INTO dip(a,b) VALUES(13,3); -# INSERT INTO dip(a,b) VALUES(14,4); -# INSERT INTO dip(a,b) VALUES(15,5); -# SELECT * FROM dip; -# DROP TABLE dip; -#END; - -#13 invoke simple stored procedure using EXECUTE -EXECUTE tmp; -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: procedure tmp() does not exist)~~ - - -#14 invoke simple stored procedure using EXEC -EXEC tmp; -~~ERROR (Code: 33557097)~~ - -~~ERROR (Message: procedure tmp() does not exist)~~ - - -#DROP PROCEDURE tmp; - -#15 UPDATE rows in existing table -CREATE TABLE tmp(a int PRIMARY KEY,b int); -INSERT INTO tmp(a,b) VALUES(1,1),(2,2),(3,3),(4,4),(5,5); -~~ROW COUNT: 5~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -3#!#3 -4#!#4 -5#!#5 -~~END~~ - -UPDATE tmp SET b=b*2+1 WHERE (a>2); -~~ROW COUNT: 3~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -3#!#7 -4#!#9 -5#!#11 -~~END~~ - -DROP TABLE tmp; - -#16 TRUNCATE table -CREATE TABLE tmp(a int PRIMARY KEY,b int); -INSERT INTO tmp(a,b) VALUES(1,1),(2,2),(3,3),(4,4),(5,5); -~~ROW COUNT: 5~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -3#!#3 -4#!#4 -5#!#5 -~~END~~ - -TRUNCATE TABLE tmp; -SELECT * FROM tmp; -~~START~~ -int#!#int -~~END~~ - -DROP TABLE tmp; - -CREATE TABLE temp1 (i INT,j INT,t TEXT); - -CREATE TABLE temp2 ( i INT,k INT); - -INSERT INTO temp1 VALUES (1, 4, 'one'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (2, 3, 'two'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (3, 2, 'three'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (4, 1, 'four'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (5, 0, 'five'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (6, 6, 'six'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (7, 7, 'seven'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (8, 8, 'eight'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (0, NULL, 'zero'); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (NULL, NULL, NULL); -~~ROW COUNT: 1~~ - -INSERT INTO temp1 VALUES (NULL, 0, 'zero'); -~~ROW COUNT: 1~~ - - -INSERT INTO temp2 VALUES (1, -1); -~~ROW COUNT: 1~~ - -INSERT INTO temp2 VALUES (2, 2); -~~ROW COUNT: 1~~ - -INSERT INTO temp2 VALUES (3, -3); -~~ROW COUNT: 1~~ - -INSERT INTO temp2 VALUES (2, 4); -~~ROW COUNT: 1~~ - -INSERT INTO temp2 VALUES (5, -5); -~~ROW COUNT: 1~~ - -INSERT INTO temp2 VALUES (5, -5); -~~ROW COUNT: 1~~ - -INSERT INTO temp2 VALUES (0, NULL); -~~ROW COUNT: 1~~ - -INSERT INTO temp2 VALUES (NULL, NULL); -~~ROW COUNT: 1~~ - -INSERT INTO temp2 VALUES (NULL, 0); -~~ROW COUNT: 1~~ - - -#17 CROSS JOIN -SELECT * FROM temp1 CROSS JOIN temp2; -~~START~~ -int#!#int#!#text#!#int#!#int -1#!#4#!#one#!#1#!#-1 -2#!#3#!#two#!#1#!#-1 -3#!#2#!#three#!#1#!#-1 -4#!#1#!#four#!#1#!#-1 -5#!#0#!#five#!#1#!#-1 -6#!#6#!#six#!#1#!#-1 -7#!#7#!#seven#!#1#!#-1 -8#!#8#!#eight#!#1#!#-1 -0#!##!#zero#!#1#!#-1 -#!##!##!#1#!#-1 -#!#0#!#zero#!#1#!#-1 -1#!#4#!#one#!#2#!#2 -2#!#3#!#two#!#2#!#2 -3#!#2#!#three#!#2#!#2 -4#!#1#!#four#!#2#!#2 -5#!#0#!#five#!#2#!#2 -6#!#6#!#six#!#2#!#2 -7#!#7#!#seven#!#2#!#2 -8#!#8#!#eight#!#2#!#2 -0#!##!#zero#!#2#!#2 -#!##!##!#2#!#2 -#!#0#!#zero#!#2#!#2 -1#!#4#!#one#!#3#!#-3 -2#!#3#!#two#!#3#!#-3 -3#!#2#!#three#!#3#!#-3 -4#!#1#!#four#!#3#!#-3 -5#!#0#!#five#!#3#!#-3 -6#!#6#!#six#!#3#!#-3 -7#!#7#!#seven#!#3#!#-3 -8#!#8#!#eight#!#3#!#-3 -0#!##!#zero#!#3#!#-3 -#!##!##!#3#!#-3 -#!#0#!#zero#!#3#!#-3 -1#!#4#!#one#!#2#!#4 -2#!#3#!#two#!#2#!#4 -3#!#2#!#three#!#2#!#4 -4#!#1#!#four#!#2#!#4 -5#!#0#!#five#!#2#!#4 -6#!#6#!#six#!#2#!#4 -7#!#7#!#seven#!#2#!#4 -8#!#8#!#eight#!#2#!#4 -0#!##!#zero#!#2#!#4 -#!##!##!#2#!#4 -#!#0#!#zero#!#2#!#4 -1#!#4#!#one#!#5#!#-5 -2#!#3#!#two#!#5#!#-5 -3#!#2#!#three#!#5#!#-5 -4#!#1#!#four#!#5#!#-5 -5#!#0#!#five#!#5#!#-5 -6#!#6#!#six#!#5#!#-5 -7#!#7#!#seven#!#5#!#-5 -8#!#8#!#eight#!#5#!#-5 -0#!##!#zero#!#5#!#-5 -#!##!##!#5#!#-5 -#!#0#!#zero#!#5#!#-5 -1#!#4#!#one#!#5#!#-5 -2#!#3#!#two#!#5#!#-5 -3#!#2#!#three#!#5#!#-5 -4#!#1#!#four#!#5#!#-5 -5#!#0#!#five#!#5#!#-5 -6#!#6#!#six#!#5#!#-5 -7#!#7#!#seven#!#5#!#-5 -8#!#8#!#eight#!#5#!#-5 -0#!##!#zero#!#5#!#-5 -#!##!##!#5#!#-5 -#!#0#!#zero#!#5#!#-5 -1#!#4#!#one#!#0#!# -2#!#3#!#two#!#0#!# -3#!#2#!#three#!#0#!# -4#!#1#!#four#!#0#!# -5#!#0#!#five#!#0#!# -6#!#6#!#six#!#0#!# -7#!#7#!#seven#!#0#!# -8#!#8#!#eight#!#0#!# -0#!##!#zero#!#0#!# -#!##!##!#0#!# -#!#0#!#zero#!#0#!# -1#!#4#!#one#!##!# -2#!#3#!#two#!##!# -3#!#2#!#three#!##!# -4#!#1#!#four#!##!# -5#!#0#!#five#!##!# -6#!#6#!#six#!##!# -7#!#7#!#seven#!##!# -8#!#8#!#eight#!##!# -0#!##!#zero#!##!# -#!##!##!##!# -#!#0#!#zero#!##!# -1#!#4#!#one#!##!#0 -2#!#3#!#two#!##!#0 -3#!#2#!#three#!##!#0 -4#!#1#!#four#!##!#0 -5#!#0#!#five#!##!#0 -6#!#6#!#six#!##!#0 -7#!#7#!#seven#!##!#0 -8#!#8#!#eight#!##!#0 -0#!##!#zero#!##!#0 -#!##!##!##!#0 -#!#0#!#zero#!##!#0 -~~END~~ - - -#18 INNER JOIN -SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 INNER JOIN temp2 ON temp1.i=temp2.i; -~~START~~ -int#!#int#!#text#!#int -1#!#4#!#one#!#-1 -2#!#3#!#two#!#2 -3#!#2#!#three#!#-3 -2#!#3#!#two#!#4 -5#!#0#!#five#!#-5 -5#!#0#!#five#!#-5 -0#!##!#zero#!# -~~END~~ - -SELECT temp1.i, temp1.j, temp1.t, temp2.k FROM temp1 JOIN temp2 ON temp1.i=temp2.i; -~~START~~ -int#!#int#!#text#!#int -1#!#4#!#one#!#-1 -2#!#3#!#two#!#2 -3#!#2#!#three#!#-3 -2#!#3#!#two#!#4 -5#!#0#!#five#!#-5 -5#!#0#!#five#!#-5 -0#!##!#zero#!# -~~END~~ - - -#19 LEFT JOIN -SELECT * FROM temp1 LEFT OUTER JOIN temp2 ON temp1.i=temp2.k; -~~START~~ -int#!#int#!#text#!#int#!#int -2#!#3#!#two#!#2#!#2 -4#!#1#!#four#!#2#!#4 -0#!##!#zero#!##!#0 -#!#0#!#zero#!##!# -#!##!##!##!# -8#!#8#!#eight#!##!# -6#!#6#!#six#!##!# -7#!#7#!#seven#!##!# -5#!#0#!#five#!##!# -1#!#4#!#one#!##!# -3#!#2#!#three#!##!# -~~END~~ - - -#20 RIGHT JOIN -SELECT * FROM temp1 RIGHT OUTER JOIN temp2 ON temp1.i=temp2.i; -~~START~~ -int#!#int#!#text#!#int#!#int -1#!#4#!#one#!#1#!#-1 -2#!#3#!#two#!#2#!#2 -3#!#2#!#three#!#3#!#-3 -2#!#3#!#two#!#2#!#4 -5#!#0#!#five#!#5#!#-5 -5#!#0#!#five#!#5#!#-5 -0#!##!#zero#!#0#!# -#!##!##!##!# -#!##!##!##!#0 -~~END~~ - - -#21 FULL OUTER JOIN -SELECT * FROM temp1,temp2; -~~START~~ -int#!#int#!#text#!#int#!#int -1#!#4#!#one#!#1#!#-1 -2#!#3#!#two#!#1#!#-1 -3#!#2#!#three#!#1#!#-1 -4#!#1#!#four#!#1#!#-1 -5#!#0#!#five#!#1#!#-1 -6#!#6#!#six#!#1#!#-1 -7#!#7#!#seven#!#1#!#-1 -8#!#8#!#eight#!#1#!#-1 -0#!##!#zero#!#1#!#-1 -#!##!##!#1#!#-1 -#!#0#!#zero#!#1#!#-1 -1#!#4#!#one#!#2#!#2 -2#!#3#!#two#!#2#!#2 -3#!#2#!#three#!#2#!#2 -4#!#1#!#four#!#2#!#2 -5#!#0#!#five#!#2#!#2 -6#!#6#!#six#!#2#!#2 -7#!#7#!#seven#!#2#!#2 -8#!#8#!#eight#!#2#!#2 -0#!##!#zero#!#2#!#2 -#!##!##!#2#!#2 -#!#0#!#zero#!#2#!#2 -1#!#4#!#one#!#3#!#-3 -2#!#3#!#two#!#3#!#-3 -3#!#2#!#three#!#3#!#-3 -4#!#1#!#four#!#3#!#-3 -5#!#0#!#five#!#3#!#-3 -6#!#6#!#six#!#3#!#-3 -7#!#7#!#seven#!#3#!#-3 -8#!#8#!#eight#!#3#!#-3 -0#!##!#zero#!#3#!#-3 -#!##!##!#3#!#-3 -#!#0#!#zero#!#3#!#-3 -1#!#4#!#one#!#2#!#4 -2#!#3#!#two#!#2#!#4 -3#!#2#!#three#!#2#!#4 -4#!#1#!#four#!#2#!#4 -5#!#0#!#five#!#2#!#4 -6#!#6#!#six#!#2#!#4 -7#!#7#!#seven#!#2#!#4 -8#!#8#!#eight#!#2#!#4 -0#!##!#zero#!#2#!#4 -#!##!##!#2#!#4 -#!#0#!#zero#!#2#!#4 -1#!#4#!#one#!#5#!#-5 -2#!#3#!#two#!#5#!#-5 -3#!#2#!#three#!#5#!#-5 -4#!#1#!#four#!#5#!#-5 -5#!#0#!#five#!#5#!#-5 -6#!#6#!#six#!#5#!#-5 -7#!#7#!#seven#!#5#!#-5 -8#!#8#!#eight#!#5#!#-5 -0#!##!#zero#!#5#!#-5 -#!##!##!#5#!#-5 -#!#0#!#zero#!#5#!#-5 -1#!#4#!#one#!#5#!#-5 -2#!#3#!#two#!#5#!#-5 -3#!#2#!#three#!#5#!#-5 -4#!#1#!#four#!#5#!#-5 -5#!#0#!#five#!#5#!#-5 -6#!#6#!#six#!#5#!#-5 -7#!#7#!#seven#!#5#!#-5 -8#!#8#!#eight#!#5#!#-5 -0#!##!#zero#!#5#!#-5 -#!##!##!#5#!#-5 -#!#0#!#zero#!#5#!#-5 -1#!#4#!#one#!#0#!# -2#!#3#!#two#!#0#!# -3#!#2#!#three#!#0#!# -4#!#1#!#four#!#0#!# -5#!#0#!#five#!#0#!# -6#!#6#!#six#!#0#!# -7#!#7#!#seven#!#0#!# -8#!#8#!#eight#!#0#!# -0#!##!#zero#!#0#!# -#!##!##!#0#!# -#!#0#!#zero#!#0#!# -1#!#4#!#one#!##!# -2#!#3#!#two#!##!# -3#!#2#!#three#!##!# -4#!#1#!#four#!##!# -5#!#0#!#five#!##!# -6#!#6#!#six#!##!# -7#!#7#!#seven#!##!# -8#!#8#!#eight#!##!# -0#!##!#zero#!##!# -#!##!##!##!# -#!#0#!#zero#!##!# -1#!#4#!#one#!##!#0 -2#!#3#!#two#!##!#0 -3#!#2#!#three#!##!#0 -4#!#1#!#four#!##!#0 -5#!#0#!#five#!##!#0 -6#!#6#!#six#!##!#0 -7#!#7#!#seven#!##!#0 -8#!#8#!#eight#!##!#0 -0#!##!#zero#!##!#0 -#!##!##!##!#0 -#!#0#!#zero#!##!#0 -~~END~~ - - -DROP TABLE temp1; -DROP TABLE temp2; - -#22 dropping all columns -CREATE TABLE tmp(a int PRIMARY KEY,b int); -INSERT INTO tmp(a,b) VALUES(1,1); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(2,2); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(3,3); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(4,4); -~~ROW COUNT: 1~~ - -INSERT INTO tmp(a,b) VALUES(5,5); -~~ROW COUNT: 1~~ - -SELECT * FROM tmp; -~~START~~ -int#!#int -1#!#1 -2#!#2 -3#!#3 -4#!#4 -5#!#5 -~~END~~ - -#ALTER TABLE tmp DROP COLUMN b; -#ALTER TABLE tmp DROP COLUMN a; -#SELECT * FROM tmp; -DROP TABLE tmp; - -#23 -CREATE TABLE DATE_dt (a DATE); -INSERT INTO DATE_dt(a) values('2000-12-13'); -~~ROW COUNT: 1~~ - -INSERT INTO DATE_dt(a) values('1900-02-28'); -~~ROW COUNT: 1~~ - -INSERT INTO DATE_dt(a) values('0001-01-01'); -~~ROW COUNT: 1~~ - -INSERT INTO DATE_dt(a) values('9999-12-31'); -~~ROW COUNT: 1~~ - -INSERT INTO DATE_dt(a) values(NULL); -~~ROW COUNT: 1~~ - -SELECT * FROM DATE_dt; -~~START~~ -date -2000-12-13 -1900-02-28 -0001-01-01 -9999-12-31 - -~~END~~ - -ALTER TABLE DATE_dt ALTER COLUMN a DATETIME; -~~ERROR (Code: 517)~~ - -~~ERROR (Message: data out of range for datetime)~~ - -SELECT * FROM DATE_dt; -~~START~~ -date -2000-12-13 -1900-02-28 -0001-01-01 -9999-12-31 - -~~END~~ - -DROP TABLE DATE_dt; -EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_unique_constraint', 'strict'; From 62c947f26dd9417a80d6d2afaf0838784787b1bd Mon Sep 17 00:00:00 2001 From: Sandeep Kumawat Date: Tue, 9 Jan 2024 08:43:16 +0000 Subject: [PATCH 15/15] undo jdbc_schedule changes Signed-off-by: Sandeep Kumawat --- test/JDBC/jdbc_schedule | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/JDBC/jdbc_schedule b/test/JDBC/jdbc_schedule index c893e95967..ea926908f7 100644 --- a/test/JDBC/jdbc_schedule +++ b/test/JDBC/jdbc_schedule @@ -8,8 +8,7 @@ # new line # 6. If you want the framework to not run certain files, use: ignore#!# -# all -TestSQLQueries +all # BABEL-SP_FKEYS test is very slow and causing github action timeout.