You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@madlib.apache.org by kh...@apache.org on 2020/10/27 20:18:06 UTC

[madlib] 01/08: DL: Update test sql to reference to tablename created in the same file

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

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

commit 6fd6d65dde0af4a54b4718c2a6c34a0948b05a73
Author: Ekta Khanna <ek...@vmware.com>
AuthorDate: Tue Oct 27 11:24:53 2020 -0700

    DL: Update test sql to reference to tablename created in the same file
    
    Prior to this commit, the tests for restricted access to custom function
    table were referencing to a tablename not intended for. The tablename
    refereced in the test was actually created in a different test file
    which masked the failure. This commit updates the tests to reference to
    the actually intended table created in the same file.
---
 .../deep_learning/test/madlib_keras_custom_function.sql_in        | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/ports/postgres/modules/deep_learning/test/madlib_keras_custom_function.sql_in b/src/ports/postgres/modules/deep_learning/test/madlib_keras_custom_function.sql_in
index d9a323a..a08f818 100644
--- a/src/ports/postgres/modules/deep_learning/test/madlib_keras_custom_function.sql_in
+++ b/src/ports/postgres/modules/deep_learning/test/madlib_keras_custom_function.sql_in
@@ -160,16 +160,16 @@ SELECT assert(name = 'top_8_accuracy', 'Top 8 accuracy name is incorrect')
 FROM __test_custom_function_table__ WHERE id = 4;
 
 CREATE SCHEMA MADLIB_SCHEMA_aaa;
-CREATE TABLE pg_temp.temp1 AS SELECT * FROM MADLIB_SCHEMA.test_custom_function_table;
-CREATE TABLE pg_temp.MADLIB_SCHEMA AS SELECT * FROM MADLIB_SCHEMA.test_custom_function_table;
-CREATE TABLE MADLIB_SCHEMA_aaa.test_table AS SELECT * FROM MADLIB_SCHEMA.test_custom_function_table;
+CREATE TABLE pg_temp.temp1 AS SELECT * FROM MADLIB_SCHEMA.__test_custom_function_table__;
+CREATE TABLE pg_temp.MADLIB_SCHEMA AS SELECT * FROM MADLIB_SCHEMA.__test_custom_function_table__;
+CREATE TABLE MADLIB_SCHEMA_aaa.test_table AS SELECT * FROM MADLIB_SCHEMA.__test_custom_function_table__;
 
 SELECT assert(MADLIB_SCHEMA.trap_error($$
   SELECT load_custom_function('pg_temp.temp1', custom_function_object(), 'sum_fn', 'returns sum');
 $$) = 1, 'Cannot use non-madlib schemas');
 
 SELECT assert(MADLIB_SCHEMA.trap_error($$
-  SELECT load_custom_function('test_custom_function_table UNION pg_temp.temp1',
+  SELECT load_custom_function('__test_custom_function_table__ UNION pg_temp.temp1',
     custom_function_object(), 'sum_fn', 'returns sum');
 $$) = 1, 'UNION should not pass');