Xiaoqing Gao has posted comments on this change. ( http://gerrit.cloudera.org:8080/19252 )
Change subject: IMPALA-11728: Set fallback database for functions ...................................................................... Patch Set 15: (2 comments) http://gerrit.cloudera.org:8080/#/c/19252/15/tests/authorization/test_ranger.py File tests/authorization/test_ranger.py: http://gerrit.cloudera.org:8080/#/c/19252/15/tests/authorization/test_ranger.py@1146 PS15, Line 1146: result = self.execute_query_expect_failure( : non_owner_client, "select identity(1)", query_options={ : 'FALLBACK_DB_FOR_FUNCTIONS': unique_database}, user=test_user) : err = "User '{0}' does not have privileges to access: {1}".format( : test_user, unique_database) : assert err in str(result) > Can you check what error is returned if look for a function that does not e It makes sense. But currently it throw an Exception "default.fn() unknown for database default.". Because it use the default database if the function does not exit in fallback db. It will throw an Exception "User non_owner does not have privileges to access: test_util_db" if change the exact precedence of the functions. 1. _impala_builtins 2. whether the function exists in fallback db, use fallback db after setting FALLBACK_DB_FOR_FUNCTIONS, else use function in current db if not set FALLBACK_DB_FOR_FUNCTIONS. If modify the precedence, there is a disadvantage that users cannot access their own databases if set FALLBACK_DB_FOR_FUNCTIONS. http://gerrit.cloudera.org:8080/#/c/19252/15/tests/query_test/test_udfs.py File tests/query_test/test_udfs.py: http://gerrit.cloudera.org:8080/#/c/19252/15/tests/query_test/test_udfs.py@674 PS15, Line 674: > Can you also add a test for show function? It should return empty result, e Done -- To view, visit http://gerrit.cloudera.org:8080/19252 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I37b7e126718fea1c50723cacbaed898b20bb55e5 Gerrit-Change-Number: 19252 Gerrit-PatchSet: 15 Gerrit-Owner: Xiaoqing Gao <[email protected]> Gerrit-Reviewer: Anonymous Coward <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Fang-Yu Rao <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Xiaoqing Gao <[email protected]> Gerrit-Comment-Date: Wed, 30 Nov 2022 06:46:11 +0000 Gerrit-HasComments: Yes
