This is an automated email from the ASF dual-hosted git repository.

okislal pushed a commit to branch madlib2-master
in repository https://gitbox.apache.org/repos/asf/madlib.git

commit 70fac35b0158b35017ae93f8abafda62bbb3c224
Author: Orhan Kislal <okis...@apache.org>
AuthorDate: Fri May 19 09:08:33 2023 -0400

    Bayes: Disable ORCA before accessing views
    
    Starting with GP7 Beta3, accesing bayes created views started crashing
    the db with ORCA. This commit disabled the optimizer with a FIXME
    comment to investigate in the future.
---
 src/ports/postgres/modules/bayes/test/bayes.sql_in       | 16 ++++++++++++++--
 .../modules/bayes/test/gaussian_naive_bayes.sql_in       | 10 ++++++++++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/ports/postgres/modules/bayes/test/bayes.sql_in 
b/src/ports/postgres/modules/bayes/test/bayes.sql_in
index 88604a6b..e04852a7 100644
--- a/src/ports/postgres/modules/bayes/test/bayes.sql_in
+++ b/src/ports/postgres/modules/bayes/test/bayes.sql_in
@@ -392,5 +392,17 @@ $$ language plpgsql;
 SELECT install_test_1();
 SELECT install_test_2();
 SELECT install_test_3();
-SELECT install_test_4();
-SELECT install_test_5();
+
+-- FIXME: ORCA started to fail with GP7 beta3 while accessing bayes created 
views in these tests
+m4_include(`SQLCommon.m4')
+m4_changequote(`<!', `!>')
+m4_ifdef(<!__POSTGRESQL__!>, <!!>, <!
+SET optimizer = off;
+!>)
+
+ SELECT install_test_4();
+ SELECT install_test_5();
+
+m4_ifdef(<!__POSTGRESQL__!>, <!!>, <!
+RESET optimizer;
+!>)
diff --git a/src/ports/postgres/modules/bayes/test/gaussian_naive_bayes.sql_in 
b/src/ports/postgres/modules/bayes/test/gaussian_naive_bayes.sql_in
index ba506ca0..26c874f7 100644
--- a/src/ports/postgres/modules/bayes/test/gaussian_naive_bayes.sql_in
+++ b/src/ports/postgres/modules/bayes/test/gaussian_naive_bayes.sql_in
@@ -216,6 +216,13 @@ SELECT create_nb_probs_view(
     'iris_probs'
 );
 
+-- FIXME: ORCA started to fail with GP7 beta3 while accessing bayes created 
views in these tests
+m4_include(`SQLCommon.m4')
+m4_changequote(`<!', `!>')
+m4_ifdef(<!__POSTGRESQL__!>, <!!>, <!
+SET optimizer = off;
+!>
+
 SELECT assert(count(*) = 10, 'Gaussian Naive Bayes produces wrong classes!')
 FROM iris_clasif, iris_test
 WHERE key = id
@@ -229,3 +236,6 @@ FROM iris_probs
 WHERE key = 87
   AND class = 2;
 
+m4_ifdef(<!__POSTGRESQL__!>, <!!>, <!
+RESET optimizer;
+!>)

Reply via email to