-
Notifications
You must be signed in to change notification settings - Fork 0
Advanced SQL Analytics Framework #2
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
base: data-analysis-features
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package sql | ||
|
|
||
| import ( | ||
| "errors" | ||
|
|
||
| "github.com/grafana/grafana-plugin-sdk-go/data" | ||
| ) | ||
|
|
||
| type DB struct { | ||
| } | ||
|
|
||
| func (db *DB) TablesList(rawSQL string) ([]string, error) { | ||
| return nil, errors.New("not implemented") | ||
| } | ||
|
|
||
| func (db *DB) RunCommands(commands []string) (string, error) { | ||
| return "", errors.New("not implemented") | ||
| } | ||
|
|
||
| func (db *DB) QueryFramesInto(name string, query string, frames []*data.Frame, f *data.Frame) error { | ||
| return errors.New("not implemented") | ||
| } | ||
|
Comment on lines
+12
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: All DB methods return "not implemented" errors The Prompt To Fix With AIThis is a comment left during a code review.
Path: pkg/expr/sql/db.go
Line: 12:22
Comment:
**logic:** All DB methods return "not implemented" errors
The `DB` struct methods are stubs that will cause runtime failures. `TablesList`, `RunCommands`, and `QueryFramesInto` all return "not implemented" errors, but `parser.go:23` and `sql_command.go:96-100` call these methods expecting them to work.
How can I resolve this? If you propose a fix, please make it concise. |
||
|
|
||
| func NewInMemoryDB() *DB { | ||
| return &DB{} | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic:
enableSqlExpressionsalways returnsfalse- the logic is brokenThe function negates the feature flag check then returns false regardless. This means SQL expressions will ALWAYS be disabled, even if the feature flag is enabled. The logic should be:
Prompt To Fix With AI