-
Notifications
You must be signed in to change notification settings - Fork 381
docs: add custom SQL filter documentation for Lance #5916
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: main
Are you sure you want to change the base?
Conversation
37d7747 to
d6758b6
Compare
Greptile SummaryAdded documentation and tests for Lance custom SQL filter support, enabling users to pass raw SQL filters and projections to Lance scanner via
Critical Issues:
Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Daft
participant LanceScanner
participant LanceDataset
User->>Daft: read_lance(uri, default_scan_options)
Note over User,Daft: default_scan_options contains:<br/>- filter: SQL filter string<br/>- columns: SQL projections<br/>- with_row_id: boolean
Daft->>LanceScanner: Initialize scanner with options
LanceScanner->>LanceDataset: Open Lance dataset
LanceDataset-->>LanceScanner: Dataset metadata
LanceScanner->>LanceScanner: Apply SQL filter string
Note over LanceScanner: Executes Lance-native SQL<br/>(e.g., st_distance, st_intersects)
LanceScanner->>LanceScanner: Apply SQL projections
Note over LanceScanner: Calculate derived columns<br/>(e.g., distance calculations)
LanceScanner-->>Daft: Filtered & projected data
Daft-->>User: DataFrame with results
|
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.
Additional Comments (4)
-
docs/connectors/lance.md, line 254-273 (link)logic: duplicate section - "Filtering with Custom SQL Expressions" already exists at lines 104-130
-
docs/connectors/lance.md, line 275 (link)logic: duplicate heading - "### Compaction" already exists at line 184
-
tests/io/lancedb/test_lancedb_reads.py, line 152 (link)style:
lanceis already imported at the top of the file (line 3), remove this redundant inline importContext Used: Rule from
dashboard- Import statements should be placed at the top of the file rather than inline within functions or met... (source) -
tests/io/lancedb/test_lancedb_reads.py, line 184 (link)style:
lanceis already imported at the top of the file (line 3), remove this redundant inline importContext Used: Rule from
dashboard- Import statements should be placed at the top of the file rather than inline within functions or met... (source)
2 files reviewed, 4 comments
d6758b6 to
ec4fd8e
Compare
- Add `Filtering with Custom SQL Expressions` section to `docs/connectors/lance.md`. - Add test cases for LanceDB read with custom SQL filters and projections.
ec4fd8e to
935b970
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5916 +/- ##
==========================================
+ Coverage 72.48% 72.62% +0.14%
==========================================
Files 966 970 +4
Lines 125838 126553 +715
==========================================
+ Hits 91211 91908 +697
- Misses 34627 34645 +18 🚀 New features to boost your workflow:
|
everettVT
left a comment
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.
Thanks @Jay-ju for adding this! LGTM.
|
@ykdojo Could you please take a look when you have time? |
Filtering with Custom SQL Expressionssection todocs/connectors/lance.md.Changes Made
Related Issues