Skip to content

kyuubi-sparksql support hive-udf permission control #7024

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

liujinhui1994
Copy link

Why are the changes needed?

kyuubi-sparksql, supports UDF permission control

How was this patch tested?

We have already run it in production without any problems, and solved the problem of controlling the permissions used by our UDF.

Was this patch authored or co-authored using generative AI tooling?

NO

@liujinhui1994 liujinhui1994 changed the title kyuubi-sparksql support udf permission control kyuubi-sparksql support hive-udf permission control Apr 15, 2025
@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (647a713) to head (982803a).
Report is 20 commits behind head on master.

Files with missing lines Patch % Lines
.../kyuubi/plugin/spark/authz/PrivilegesBuilder.scala 0.00% 25 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #7024    +/-   ##
=======================================
  Coverage    0.00%   0.00%            
=======================================
  Files         694     696     +2     
  Lines       42768   43042   +274     
  Branches     5821    5858    +37     
=======================================
- Misses      42768   43042   +274     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@turboFei
Copy link
Member

FYI: You can run dev/reformat to refine the style.

@liujinhui1994
Copy link
Author

@turboFei please review thanks

@pan3793
Copy link
Member

pan3793 commented May 12, 2025

@liujinhui1994 any chance to supply a unit test to cover your changes, to avoid being broken accidentally in the future?

udfExpr.nodeName.equals("HiveSimpleUDF") ||
udfExpr.nodeName.equals("HiveUDAFFunction") =>
val funName: String = getFieldValNoError(udfExpr, "name")
val isFun: Boolean = getFieldValNoError(udfExpr, "isUDFDeterministic")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why should we check isUDFDeterministic?

@pan3793
Copy link
Member

pan3793 commented May 12, 2025

after a closer look at the code, the direction might be incorrect, there is an existing FunctionExtractor that supports extracting Hive UDFs, but seems was not applied properly for commands and queries.

@liujinhui1994
Copy link
Author

@liujinhui1994 any chance to supply a unit test to cover your changes, to avoid being broken accidentally in the future?
ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants