Fix table function audit operation type - #18351
Open
HTHou wants to merge 1 commit into
Open
Conversation
HTHou
marked this pull request as ready for review
July 29, 2026 08:51
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18351 +/- ##
============================================
+ Coverage 43.14% 43.16% +0.02%
Complexity 374 374
============================================
Files 5364 5364
Lines 382623 382678 +55
Branches 49749 49755 +6
============================================
+ Hits 165077 165198 +121
+ Misses 217546 217480 -66 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
CREATE FUNCTIONandDROP FUNCTIONauthorization audit entries asDDL.SYSTEMwhile allowing the statement operation type and audit object to be supplied explicitly.CONTROLclassification for otherSYSTEMprivilege checks.Root cause
The Table-model function statements used the generic global
SYSTEMprivilege check. That check derived the audit operation fromTableModelPrivilege.SYSTEM, which maps toCONTROL. The Tree-model path already classifies function creation and deletion explicitly asDDL, so the two SQL dialects produced inconsistent audit records.Impact
Audit filters and reports now classify function metadata changes consistently as DDL without changing function-management authorization requirements or the classification of unrelated system-control operations.
Validation
mvn test -pl iotdb-core/datanode -Dtest=AuthTest -DfailIfNoTests=false