Skip to content

Commit

Permalink
Update RangerSparkExtensionSuite.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
AngersZhuuuu committed Jan 22, 2024
1 parent 4acbc42 commit 74bd3f4
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -936,15 +936,11 @@ class HiveCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
|AS
|SELECT count(*) as cnt, sum(id) as sum_id FROM $db1.$table1
""".stripMargin))
doAs(someone, sql(s"SELECT count(*) FROM $db1.$table1").show())
checkAnswer(someone, s"SELECT count(*) FROM $db1.$table1", Row(0) :: Nil)

interceptEndsWith[AccessControlException](
doAs(someone, sql(s"SELECT count(*) FROM $db1.$view1").show()))(
s"does not have [select] privilege on [$db1/$view1/id,$db1/$view1/scope]")
checkAnswer(someone, s"SELECT count(*) FROM $db1.$view1", Row(0) :: Nil)

interceptEndsWith[AccessControlException](
doAs(someone, sql(s"SELECT count(*) FROM $db1.$view2").show()))(
s"does not have [select] privilege on [$db1/$view2/cnt,$db1/$view2/sum_id]")
checkAnswer(someone, s"SELECT count(*) FROM $db1.$view2", Row(1) :: Nil)

interceptEndsWith[AccessControlException](
doAs(someone, sql(s"SELECT count(id) FROM $db1.$table1 WHERE id > 10").show()))(
Expand Down

0 comments on commit 74bd3f4

Please sign in to comment.