-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
test: integration tests for error rate #1542
Conversation
…into release/v3 * 'release/v3' of https://github.com/Sinaptik-AI/pandas-ai: fix(VirtualDataframe): fixing virtual dataframe name conflict (sinaptik-ai#1531)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* commit '4db35d2b278559eef8b6d5ad15bdc1d8a3936855': cd: fix poetry version cd: use python 3.10 Release v3.0.0-beta.0 docs: udpated gif in readme 3.0 (sinaptik-ai#1536)
* commit '7967d07f90866edc71f12fdac61761d0946712f8': fix: dependency issue and updated lock files (sinaptik-ai#1539)
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.
❌ Changes requested. Reviewed everything up to 1b20e4c in 2 minutes and 19 seconds
More details
- Looked at
595
lines of code in8
files - Skipped
0
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. pandasai/data_loader/loader.py:148
- Draft comment:
Ensureself.query_builder
is initialized before using it. Consider raising an exception if it'sNone
. - Reason this comment was not posted:
Comment did not seem useful.
2. pandasai/data_loader/loader.py:152
- Draft comment:
Ensureself.query_builder
is initialized before using it. Consider raising an exception if it'sNone
. - Reason this comment was not posted:
Marked as duplicate.
3. pandasai/data_loader/view_query_builder.py:11
- Draft comment:
Check if the query already contains aWITH
clause before adding another one. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
This is a valid concern - if format_query() is called with a query that already has a WITH clause, concatenating another WITH statement would create invalid SQL. However, I need to consider if this is actually possible in the codebase's usage. The class seems designed to build views specifically, and the WITH clause is core to its functionality. The parent QueryBuilder likely doesn't handle WITH clauses.
I don't have visibility into how format_query() is used in the broader codebase. The query parameter could come from anywhere.
While I don't have full context, the class name ViewQueryBuilder and its purpose strongly suggest it's specifically designed to wrap queries in WITH clauses to create views. Any code using this class would expect this behavior.
The comment should be deleted. While technically correct, it goes against the class's core purpose of building view queries with WITH clauses.
4. pandasai/data_loader/semantic_layer_schema.py:171
- Draft comment:
Check ifself.relations
isNone
before iterating over it to avoidTypeError
. - Reason this comment was not posted:
Comment was on unchanged code.
5. pandasai/data_loader/semantic_layer_schema.py:172
- Draft comment:
The error message can be improved for clarity and conciseness.
raise ValueError("At least one relation must be defined for a view.")
- Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_dxDXsxM8XjwKyCUW
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
… into fix/SIN-310 * 'fix/SIN-310' of https://github.com/scaliseraoul/pandas-ai: Update pandasai/data_loader/loader.py
Important
Introduces
ViewQueryBuilder
for handling view-based queries inDatasetLoader
and adds related tests and schema validations.DatasetLoader
now usesViewQueryBuilder
ifschema.source.view
is true, otherwise usesQueryBuilder
.ViewQueryBuilder
formats queries with aWITH
statement for views.SemanticLayerSchema
raises error if no relations are defined for views.ViewQueryBuilder
extendingQueryBuilder
to handle view-specific query logic.test_view_query_builder.py
to testViewQueryBuilder
functionality.test_semantic_layer_schema.py
for view relation validation.test_agent_chat.py
for integration tests with various data scenarios.This description was created by for 1b20e4c. It will automatically update as commits are pushed.