GitHub user robertamarton opened a pull request:
https://github.com/apache/trafodion/pull/1512
Get statement enhancements
Added support and privilege checks for the following commands:
get functions for library
get procedures for library
get table_mapping functions for library
get indexes on table
get objects on table
get views on table
get views on view
get libraries in schema
get objects in view
get tables in view
get views in view
get indexes for user
get tables for user
get libraries for user
get views for user
Changed "get libraries for schema" to include libraries where the current
user
has execute privilege on one of the libraries routines (functions,
procedures,
or table_mapping functions).
Addressed a performance issue when determining if the user has column level
privileges. If the user has granted privileges against native Hive tables
through EsgynDB, we need to get the column name from Hive. The call to get
the
column, by calling hivemd, is very expensive. This change checks to see if
the
requested user has been granted any column level privileges on a hive table.
If so, we will go ahead and do the mapping (call hivemd). If not, then we
will
not include the hivemd fragment for the query. Since we are scanning the
column
privileges table anyway, we also see if the requested user (or their roles)
has
been granted any privileges. If so, we include the column privileges check
in
the query.
Commented out get statements that we do not support at this time.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/robertamarton/incubator-trafodion get-stmts
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafodion/pull/1512.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1512
----
commit 021faec6a18336cfefd11b30d100a8fe4e3da1ee
Author: Roberta Marton <rmarton@...>
Date: 2018-04-10T18:35:39Z
Get statement enhancements
Added support and privilege checks for the following commands:
get functions for library
get procedures for library
get table_mapping functions for library
get indexes on table
get objects on table
get views on table
get views on view
get libraries in schema
get objects in view
get tables in view
get views in view
get indexes for user
get tables for user
get libraries for user
get views for user
Changed "get libraries for schema" to include libraries where the current
user
has execute privilege on one of the libraries routines (functions,
procedures,
or table_mapping functions).
Addressed a performance issue when determining if the user has column level
privileges. If the user has granted privileges against native Hive tables
through EsgynDB, we need to get the column name from Hive. The call to get
the
column, by calling hivemd, is very expensive. This change checks to see if
the
requested user has been granted any column level privileges on a hive table.
If so, we will go ahead and do the mapping (call hivemd). If not, then we
will
not include the hivemd fragment for the query. Since we are scanning the
column
privileges table anyway, we also see if the requested user (or their roles)
has
been granted any privileges. If so, we include the column privileges check
in
the query.
Commented out get statements that we do not support at this time.
----
---