-
Notifications
You must be signed in to change notification settings - Fork 938
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
[AUTHZ] Support CreateTableAs command for Paimon #5590
[AUTHZ] Support CreateTableAs command for Paimon #5590
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5590 +/- ##
============================================
+ Coverage 61.35% 61.67% +0.31%
Complexity 23 23
============================================
Files 600 603 +3
Lines 34316 35670 +1354
Branches 4501 4869 +368
============================================
+ Hits 21054 21998 +944
- Misses 11128 11290 +162
- Partials 2134 2382 +248 see 63 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I want ask a question, why the admin to execute doAs in the next, don't use sql to execute, i found your code is doAs code is
If we not use spark.sql to execute our sql, it's only a string format??? Which is the right way??? |
@davidyuan1223 I believe you are right, and @bowenliang123 made a mistake. Nice catch. |
And I found the DeltaCatalogRanger also is this code style, I think you need to check the authz module's test case to avoid this problem. This problem just like this comment, I want know why admin create table but it can not select from the table? |
Sorry about that. Will fix and have further investigation. |
@davidyuan1223 More investigation in the logical plan is required to find the reason. Maybe missing fields in parsed privilege objects. Let me update the test case for Paimon first. And thanks for mentioning possible bug for Delta test suite as well. |
thanks your reply, if you find the root cause about this bug, wish you can teach me how to fix this, so that I can complete the issue #5470 |
Sure. Will ping you when I came to any conclusion in the reason. Thanks for creating a bug issue for it. |
LGTM, I will debug in my env |
Yes. Will have a dive-in debugging in extractors later. |
It's normal to see lakehouse has individual implementation of spark plan in some commands. They're still part of spark plans. To support them, we could adapt our extractor for the details of the plan. But the precondition is that table identifier is carried by the plan. Should have look at filestore class of paimon for that. |
Why are the changes needed?
Support CreateTableAs command for Paimon
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.