Repository navigation
Benchmark: grafana PR 94942 - #19
celmis-codereviewer wants to merge 2 commits into
Conversation
remove duckdb ref
celmis-codereviewer
left a comment
There was a problem hiding this comment.
💬 COMMENT — findings to consider
Full findings and scope are in the review summary comment on this pull request — one persistent comment, updated in place on every run.
| if enabled { | ||
| return false | ||
| } | ||
| return false |
There was a problem hiding this comment.
Why: When IsEnabledGlobally returns true on line 195 of pkg/expr/reader.go, enableSqlExpressions reaches line 199 and returns false instead of true, causing SQL expression queries to always fail with an error regardless of feature flag configuration.
🟠 enableSqlExpressions unconditionally returns false
In enableSqlExpressions, enabled is set to !h.features.IsEnabledGlobally(...). If the feature is disabled (IsEnabledGlobally returns false), enabled is true and line 197 returns false. If the feature is enabled (IsEnabledGlobally returns true), enabled is false, skipping the if block and reaching line 199 which also returns false. As a result, enableSqlExpressions always returns false, preventing SQL expressions from ever being enabled.
| return false | |
| func enableSqlExpressions(h *ExpressionQueryReader) bool { | |
| return h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions) | |
| } |
agent: defect · rule: defect.dead-branch · confidence: 1.00
🤖 Code Review for PR #19⚙ ADJUSTED — graph context partial (5 of 6 changed files): 1 of 6 changed files have no symbols in the index; 1 of them is not in that checkout at all (pkg/expr/reader.go) — this PR's base is older than the indexed revision, so those files were renamed or deleted before it and no re-index can bring them back; there is nothing to fix. 💬 COMMENT — findings to consider Findings
Scope
Performance
Powered by Code Analyzer · context: tree-sitter graph + structural, cve, security, contract, defect |
Benchmark reproduction of grafana#94942