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

Limitations with AND & OR operators. #106

Open
SajadKarim opened this issue Apr 22, 2021 · 0 comments
Open

Limitations with AND & OR operators. #106

SajadKarim opened this issue Apr 22, 2021 · 0 comments

Comments

@SajadKarim
Copy link
Contributor

Current implementation does not allow to form the following queries;

  1. SELECT _id, "city", "customerid", "state", "firstname", "lastname", "zip", "address", "email" FROM "namespace_customersTable" WHERE ( ("customerid" = 3 AND "zip" = 22121) OR ( "customerid" = 1 AND "zip" = 22902 );
  2. SELECT _id, "city", "customerid", "state", "firstname", "lastname", "zip", "address", "email" FROM "namespace_customersTable" WHERE ( ("customerid" = 3 OR "zip" = 22121) AND ( "customerid" = 1 OR "zip" = 22902 );

Table can be found at this link: https://github.com/SajadKarim/julea/blob/7e2768ce2cc7ba61691875d346cf004f4946fee3/test/db/operators.c.

Also, the details mentioned under heading “3.3.2 JDBSelector” in document "https://wr.informatik.uni-hamburg.de/_media/research:theses:benjamin_warnke_integrating_self_describing_data_formats_into_file_systems.pdf" does not support abovementioned query.

Possible fix: function JDBSelector::j_db_selector_add_selector should take operator information as input and the backend function should use it to append two selectors (https://github.com/julea-io/julea/blob/master/backend/db/sql-generic.c#L1533 - 1547) instead of using the one attached to the first (or preceding) one.

A branch (#105) is added that contains a test case which has the above table and related code.

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

No branches or pull requests

1 participant