Conversation
Signed-off-by: 付典 <fudianchn@gmail.com>
fudianchn
marked this pull request as ready for review
October 2, 2026 11:34
Contributor
|
This makes sense, thank you for working on it. |
Signed-off-by: 付典 <fudianchn@gmail.com>
This branch has not been deployed
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.
AI disclosure: this change was prepared with AI coding agents, reviewed and revised line by line by me.
What
Keep generic feature-analysis fallback conservative without inserting Java statement or container class names into unresolved references.
Why
An unclassified statement currently receives an unresolved reference such as
oraclenullstatement, and an empty script receivesstatements. These names do not identify a function, procedure or dynamic SQL marker for a caller to resolve. The documented feature verdict still needs to remain opaque.How
Separate the existing opaque feature flags from explicit reference registration. The generic fallback adds only OPAQUE and its four possible effects. Visitors which supply a procedure name or an explicit marker keep registering that reference. Document that an empty reference set does not establish safety.
Root cause
Both single-statement and aggregate analysis pass a Java simple class name to
failLoudIfSilent. That helper calls the sameopaque(reference)method used for meaningful procedure names and dynamic SQL markers, which adds its argument to the lower-case unresolved set.Testing
6d1ec1df1596d154fff3911452cd6979d46b9751and the fix. The baseline has 8 assertion failures and 6 passing normal controls; the fix passes all 14. No baseline parser errors are counted as this defect.Behavior notes
OPAQUEand possible READS_DATA, RETURNS_RESULT_SET, MODIFIES_DATA and MODIFIES_SCHEMA are unchanged. Empty unresolved references do not mean effects are known or safe; callers must inspect the feature verdict.CreateFunctionalStatementhas a separate explicit statement-type marker, such ascreatefunction; it remains unchanged. This change does not promise that every existing marker is a SQL catalogue name.Verification of the original issue
No existing issue is linked. On upstream
6d1ec1df1596d154fff3911452cd6979d46b9751,new OracleNullStatement().getFeatures()is opaque with unresolved[oraclenullstatement];StatementFeatureVisitor.analyse(new Statements())is opaque with unresolved[statements]. Both now retain exactly the same feature flags with an empty reference set. An Oracle assignment to an unproven function retains its function name without addingoracleassignment. Fixed local commit:cd35c83e12a488a1bd6f6c034f5283e2f785e5bdonfix/keep-feature-fallback-references-semantic. Independent owner review and combined validation with PR #2738 and the separate metadata classification fix pass.