Skip to content
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

Refactor SQL agent #1010

Merged
merged 11 commits into from
Feb 5, 2025
Merged

Refactor SQL agent #1010

merged 11 commits into from
Feb 5, 2025

Conversation

ahuang11
Copy link
Contributor

The goal of this PR is to simplify SQLAgent and make it run faster by reducing the number of steps to output SQL.

Changes:

  1. Merged select_table, require_joins, find_joins into find_tables.
  2. Changed the separator because <-> was really hard to look at, compared to :::
  3. Reduced duplication in Planner (was showing double of the same schemas)
  4. make_tables_model also highlights issues when joining
image

@ahuang11 ahuang11 requested a review from philippjfr January 30, 2025 02:11
@philippjfr
Copy link
Member

I think this is a nice improvement in principle but I've also found issues and am not confident I can track them all down.

@ahuang11
Copy link
Contributor Author

Maybe test more and merge after announcement/release then?

@ahuang11 ahuang11 mentioned this pull request Jan 30, 2025
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 10.52632% with 68 lines in your changes missing coverage. Please review.

Project coverage is 57.65%. Comparing base (2b3c195) to head (6ff33a7).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
lumen/ai/agents.py 7.40% 50 Missing ⚠️
lumen/ai/coordinator.py 0.00% 16 Missing ⚠️
lumen/ai/models.py 80.00% 1 Missing ⚠️
lumen/ai/utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1010      +/-   ##
==========================================
+ Coverage   57.47%   57.65%   +0.18%     
==========================================
  Files         109      109              
  Lines       14262    14212      -50     
==========================================
- Hits         8197     8194       -3     
+ Misses       6065     6018      -47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ahuang11
Copy link
Contributor Author

image

@ahuang11 ahuang11 requested a review from philippjfr January 31, 2025 19:06
@philippjfr philippjfr enabled auto-merge (squash) February 5, 2025 16:56
@philippjfr philippjfr merged commit e7214a8 into main Feb 5, 2025
12 checks passed
@philippjfr philippjfr deleted the refactor_sql_agent branch February 5, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants