madlib-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From njaya...@apache.org
Subject madlib git commit: Validation: Support other 'relkind' for input tables
Date Tue, 18 Dec 2018 21:48:08 GMT
Repository: madlib
Updated Branches:
  refs/heads/master fd4b5c242 -> 70afde269


Validation: Support other 'relkind' for input tables

JIRA: MADLIB-1287

Within `validate_args.py_in:table_exists()` we checked if a table existed within
`pg_class` but limited the input table to specific `relkind`s. This limited
scope is unnecessary and precluded MADlib functions from accepting partition
tables.

This commit removes the `relkind` check, effectively adding 'partition',
'index' and 'sequence' tables as valid input tables.

Closes #340


Project: http://git-wip-us.apache.org/repos/asf/madlib/repo
Commit: http://git-wip-us.apache.org/repos/asf/madlib/commit/70afde26
Tree: http://git-wip-us.apache.org/repos/asf/madlib/tree/70afde26
Diff: http://git-wip-us.apache.org/repos/asf/madlib/diff/70afde26

Branch: refs/heads/master
Commit: 70afde269a127c23ffc1164ab119baa36575c2a0
Parents: fd4b5c2
Author: Rahul Iyer <riyer@apache.org>
Authored: Tue Dec 11 05:24:17 2018 -0800
Committer: Nandish Jayaram <njayaram@apache.org>
Committed: Tue Dec 18 13:45:42 2018 -0800

----------------------------------------------------------------------
 src/ports/postgres/modules/utilities/validate_args.py_in | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/madlib/blob/70afde26/src/ports/postgres/modules/utilities/validate_args.py_in
----------------------------------------------------------------------
diff --git a/src/ports/postgres/modules/utilities/validate_args.py_in b/src/ports/postgres/modules/utilities/validate_args.py_in
index b400e1a..e685bc4 100644
--- a/src/ports/postgres/modules/utilities/validate_args.py_in
+++ b/src/ports/postgres/modules/utilities/validate_args.py_in
@@ -156,7 +156,6 @@ def table_exists(tbl, only_first_schema=False):
                 WHERE relnamespace = pg_namespace.oid
                   AND nspname {schema_expr}
                   AND (relname = '{table}')
-                  AND relkind IN ('r', 'v', 'm', 't', 'f')
             ) AS table_exists
             """.format(**locals()))[0]['table_exists']
         return bool(does_table_exist)


Mime
View raw message