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

support mixed types for row filtering #20

Open
cldellow opened this issue Jun 25, 2018 · 0 comments
Open

support mixed types for row filtering #20

cldellow opened this issue Jun 25, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@cldellow
Copy link
Owner

SQLite inherited Tcl's loose typing. "1930" can be summed like it was a number and 1930 can be compared successfully to its string form.

The SQLite vtable API permits an implementation to filter non-responsive rows before returning them to the SQLite VM for processing. We currently do this, but only if the type of the column in the row group matches the type in the constraint, eg:

bool ParquetCursor::currentRowSatisfiesTextFilter(Constraint& constraint) {
if(constraint.type != Text) {
return true;
}

This results in a performance penalty if the user mixes and matches types, which would be a very natural thing for a SQLite user to do:

sqlite> select count(*) from census where profile_id = '1930';
5469
Run Time: real 0.636 user 0.640000 sys 0.000000
sqlite> select count(*) from census where profile_id = 1930;
5469
Run Time: real 2.235 user 2.220000 sys 0.012000

We should accommodate this use case - perhaps by doing the conversion at query construction time in the xFilter API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant