Skip to content

Commit

Permalink
Update HudiCatalogRangerSparkExtensionSuite.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
AngersZhuuuu committed Oct 20, 2023
1 parent 08be589 commit 2598af2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import org.apache.kyuubi.util.AssertionUtils.interceptContains
*/
@HudiTest
class HudiCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
override protected val catalogImpl: String = "hive"
override protected val catalogImpl: String = "in-memory"
// TODO: Apache Hudi not support Spark 3.5 and Scala 2.13 yet,
// should change after Apache Hudi support Spark 3.5 and Scala 2.13.
private def isSupportedVersion = !isSparkV35OrGreater && !isScalaV213
Expand Down Expand Up @@ -447,11 +447,13 @@ class HudiCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
interceptContains[AccessControlException] {
doAs(someone, sql(deleteFrom))
}(s"does not have [update] privilege on [$namespace1/$table1]")
doAs(admin, sql(deleteFrom))

val updateSql = s"UPDATE $namespace1.$table1 SET name = 'test' WHERE id > 10"
interceptContains[AccessControlException] {
doAs(someone, sql(updateSql))
}(s"does not have [update] privilege on [$namespace1/$table1]")
doAs(admin, sql(updateSql))

val mergeIntoSQL =
s"""
Expand All @@ -466,6 +468,7 @@ class HudiCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
doAs(someone, sql(mergeIntoSQL))
}(s"does not have [select] privilege on " +
s"[$namespace1/$table2/id,$namespace1/$table2/name,$namespace1/$table2/city]")
doAs(admin, sql(mergeIntoSQL))
}
}
}
Expand Down

0 comments on commit 2598af2

Please sign in to comment.