-
Notifications
You must be signed in to change notification settings - Fork 70
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
Mapping LIKE and ILIKE operators as RegexMatch #176
base: master
Are you sure you want to change the base?
Conversation
e1d3305
to
255964f
Compare
Hi @ahuarte47 , thanks for submitting PR. On higher level, this feature looks helpful to me. We will review this PR. Could you please add test cases to regression test suite to test this feature? You can provide separate patch for test cases otherwise you can provide combined patch. Thanks again. |
Hi @vaibhavdalvi93 thanks for your comments. Sorry, how can I add a test for this feature? I am seeing a |
@ahuarte47 , you can add test cases at places you pointed above and run the regression test suite. Once you do the changes in .sql files then run regression as mentioned in README file here. The regression will fail with these changes and then change in expected file i.e. .out file. E.g. If you did changes in sql/select.sql then expected/select.out also need to be changed accordingly. Let me know if you need more information. Thanks. |
Hi @vaibhavdalvi93 thanks for your help, I am not be able to run the tests properly. I have executed the script But I had to add the user/pass when creating the user mapping setting in all sql files in order to read data from MongoDB: Please, do you know what I am doing wrong? |
@ahuarte47 , Please run the regression on latest HEAD i.e. without your changes. Can you please share diff file to analyse it further.
Please use following command to run init file:
Don't need to do it. Run following commands in mongo_fdw source directory:
|
I executed everything of that, I am seeing that test datasets in a MongoExpress instance. But If I do not add the credentials when creating the User Mapping, all SELECT statements return 0 records and INSERT statements throw: |
@ahuarte47 , thanks for more information. I am not sure about the issue you're facing. Can you post separate patch for testing here. We will check it further along with code changes. Thanks. |
testing-mongo_fdw.zip
Tests were executed with the original MASTER branch. As you can view all |
This PR adds support to run
LIKE
(i.e.~~
) orILIKE
(i.e.~~*
) on the remote server using theregexMatch
operator from Mongo.