From e1cbe31b812e5bbd087c9ae713eb2a169fedeecd Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 24 Aug 2017 17:54:45 +0300 Subject: [PATCH] Enable forgotten test. Commit 0be2e5b0b3 added a regression test to check that if a view contains an ORDER BY, that ORDER BY is obeyed on selecting from the view. However, it forgot to add the test to the schedule, so it was never run. Add it. There is actually a problem with the test as it is written: gpdiff masks out the differences in the row order, so this test won't catch the problem that it was originally written for. Nevertheless, seems better to enable the test and run, than not run it at all. But add a comment to point that out. --- src/test/regress/expected/gp_create_view.out | 5 +++++ src/test/regress/greenplum_schedule | 2 +- src/test/regress/sql/gp_create_view.sql | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/test/regress/expected/gp_create_view.out b/src/test/regress/expected/gp_create_view.out index 2ce85edb9e..da51a68aa8 100644 --- a/src/test/regress/expected/gp_create_view.out +++ b/src/test/regress/expected/gp_create_view.out @@ -30,6 +30,11 @@ insert into sourcetable values ( 3, 30, 600, '1401-6-1', 12, 5), ( 4, 40, 700, '1401-6-1', 1, 1), ( 4, 40, 800, '1401-6-1', 1, 1); +-- Check that the rows come out in order, if there's an ORDER BY in +-- the view definition. +-- +-- FIXME: gpdiff will unfortunately mask out any differences in the +-- row order, so this test wouldn't catch a bug in that. create view v_sourcetable as select * from sourcetable order by vn; select * from v_sourcetable; cn | vn | pn | dt | qty | prc diff --git a/src/test/regress/greenplum_schedule b/src/test/regress/greenplum_schedule index 0c4cbec241..8f8945a6ed 100755 --- a/src/test/regress/greenplum_schedule +++ b/src/test/regress/greenplum_schedule @@ -17,7 +17,7 @@ test: gp_metadata variadic_parameters default_parameters function_extensions spi gp_xml pgoptions shared_scan -test: leastsquares opr_sanity_gp decode_expr bitmapscan bitmapscan_ao case_gp limit_gp notin percentile join_gp union_gp gpcopy gp_create_table +test: leastsquares opr_sanity_gp decode_expr bitmapscan bitmapscan_ao case_gp limit_gp notin percentile join_gp union_gp gpcopy gp_create_table gp_create_view test: filter gpctas gpdist matrix toast sublink table_functions olap_setup complex opclass_ddl information_schema guc_env_var guc_gp gp_explain test: bitmap_index gp_dump_query_oids analyze gp_owner_permission test: indexjoin as_alias regex_gp gpparams with_clause transient_types gp_rules diff --git a/src/test/regress/sql/gp_create_view.sql b/src/test/regress/sql/gp_create_view.sql index 37a214b373..00cc22fa56 100644 --- a/src/test/regress/sql/gp_create_view.sql +++ b/src/test/regress/sql/gp_create_view.sql @@ -29,6 +29,11 @@ insert into sourcetable values ( 4, 40, 700, '1401-6-1', 1, 1), ( 4, 40, 800, '1401-6-1', 1, 1); +-- Check that the rows come out in order, if there's an ORDER BY in +-- the view definition. +-- +-- FIXME: gpdiff will unfortunately mask out any differences in the +-- row order, so this test wouldn't catch a bug in that. create view v_sourcetable as select * from sourcetable order by vn; select * from v_sourcetable; -- GitLab