-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KYUUBI #5690][AUTHZ] Support insert into/overwrite path-based table for Delta Lake in Authz #5691
Conversation
insert into
insert overwrite
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5691 +/- ##
============================================
- Coverage 61.46% 61.40% -0.06%
Complexity 23 23
============================================
Files 604 607 +3
Lines 35697 35735 +38
Branches 4889 4896 +7
============================================
+ Hits 21942 21944 +2
- Misses 11380 11402 +22
- Partials 2375 2389 +14 ☔ View full report in Codecov by Sentry. |
val maybeCatalogPlugin = invokeAs[Option[AnyRef]](v2Relation, "catalog") | ||
val maybeCatalog = maybeCatalogPlugin.flatMap(catalogPlugin => | ||
plan.find(_.getClass.getSimpleName == "DataSourceV2Relation") match { | ||
case Some(v2Relation @ DataSourceV2Relation(table, _, catalog, identifier, _)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let‘s use v2Relation.xx instead of unapply
which is easy to break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
override def apply(spark: SparkSession, v1: AnyRef): Seq[Uri] = { | ||
val plan = v1.asInstanceOf[LogicalPlan] | ||
plan.find(_.getClass.getSimpleName == "DataSourceV2Relation") match { | ||
case Some(DataSourceV2Relation(_, _, _, Some(identifier), _)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
thanks, merged to master |
Thanks, @yaooqinn |
Why are the changes needed?
To close #5690 .
Support insert into/overwrite path-based table for Delta Lake in Authz plugin.
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request
Was this patch authored or co-authored using generative AI tooling?
No.