-
Notifications
You must be signed in to change notification settings - Fork 251
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
Build Scanner with nested column projection and limit / offset push down. #61
Conversation
A code snippet to run import time
import duckdb
import lance
ds = lance.dataset("s3://eto-ops-testing/coco.lance")
start = time.time()
scan = lance.scanner(ds, columns=["annotations.label"], limit=10)
print(duckdb.query(
"SELECT annotations.label, count(1) FROM (SELECT UNNEST(annotations) as annotations FROM scan) GROUP BY 1"))
end = time.time()
print(f"Query time: {end - start}") |
builder.get().Project([tobytes(c) for c in columns]) | ||
if filter is not None: | ||
builder.get().Filter(_bind(filter, dataset.schema())) | ||
if limit is not None: |
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.
Silly edge case but offset is ignored if limit isn't specified. May want to document that
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.
SQL standard does not support offset w/o LIMIT IIRC.
No description provided.