-
Notifications
You must be signed in to change notification settings - Fork 85
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
Implementing LIKE Operator #330
Conversation
Overview The backend changes required to implement LIKE Operator, similar to SQL (As explained in issue polypheny#310) in JAVA are included in this PR. Changes Included 1. Added Conditional Statements for executing the Pattern matching conditions. 2. Added Switch-Case Statements which perform different functionalities of LIKE Operator.
Hi @syedsafi30. If I understand correctly, your implementation of the LIKE operator returns always true. The implementation did not solve the problems described in the issue. The first goal is to create a regular expression where all necessary characters are escaped (for example a dot should be escaped). The second goal is to provide support for the |
Hi @nilshansen94 , thanks for your response. I’ll be happy to take suggestions and improve the code further. |
Hi @syedsafi30, thank you for your work. Your code does not work unfortunately. As mentioned before, the code in the ALTER ADAPTERS ADD "file" USING 'org.polypheny.db.adapter.file.FileStore' WITH '{}';
CREATE TABLE "public"."user"("id" BIGINT NOT NULL,"name" VARCHAR(20),"comment" VARCHAR(174),PRIMARY KEY ("id")) ON STORE "file";
INSERT INTO public."user" (id, name, comment) values (1, 'anna', 'Hello world, how are you'), (2, 'bob', 'Hello World, how ore ya'), (3, 'john', 'hi');
select * from "user" where comment like 'Hell_ wo%'; --matches only the row with anna, because we're matching case-sensitive The idea is that the query string in the parameterValue should be escaped and that the |
Hi @nilshansen94 Thanks for your briefed response, I have started writing an algorithm towards resolving the issue to implement the LIKE operator and the wildcards as you have described above. |
The backend changes required to implement LIKE Operator, similar to SQL (As explained in issue polypheny#310) in JAVA are included in this PR. Changes Included 1. Replaces the parameterValue "%" as ".*" 2. Replaces the "_" wildcard to "."
Hi @nilshansen94, I have made the necessary changes to the file, please review them. |
Overview
The backend changes required to implement LIKE Operator, similar to SQL (As explained in issue #310) in JAVA are included in this PR.
Changes Included