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

Provide binary to profiling scans #149

Merged
merged 5 commits into from
Sep 9, 2022
Merged

Provide binary to profiling scans #149

merged 5 commits into from
Sep 9, 2022

Conversation

eddyxu
Copy link
Contributor

@eddyxu eddyxu commented Sep 9, 2022

Provide a CLI executable to be used profiling scan performance

@eddyxu eddyxu requested a review from changhiskhan September 9, 2022 00:13
auto scan_builder = lance::arrow::ScannerBuilder(dataset);
assert(scan_builder.Project(columns).ok());
auto scanner = scan_builder.Finish().ValueOrDie();
fmt::print("Dataset count: {}\n", scanner->CountRows().ValueOrDie());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does CountRows actually execute the scan?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is a virtual function that calls ScanBatch by default. Also this is observed when SELECT count(1) FROM dataset is not optimized in duckdb.

We can change this code to use ScanBatch as well.

@eddyxu eddyxu self-assigned this Sep 9, 2022
@eddyxu eddyxu added benchmark c++ C++ issues labels Sep 9, 2022
@eddyxu eddyxu merged commit ffd2af4 into main Sep 9, 2022
@eddyxu eddyxu deleted the lei/profile_scan branch September 9, 2022 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants