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

special character behavior in LIKE pattern #25

Closed
ken3 opened this issue Jan 14, 2020 · 3 comments
Closed

special character behavior in LIKE pattern #25

ken3 opened this issue Jan 14, 2020 · 3 comments

Comments

@ken3
Copy link

ken3 commented Jan 14, 2020

[OS] CentOS 7.7.1908
[go version] go1.13.3 linux/amd64

input file is sample.txt

case 1, case2 and case 3 should cause the same result, but case 2 does not.

case 1 (expected): $ cat sample.txt|csvq -n "select * where c1 like '%i686'"
+--------------------------------+
| c1 |
+--------------------------------+
| glibc-2.28-9.fc29.i686 |
| glibc-devel-2.28-9.fc29.i686 |
| glibc-headers-2.28-9.fc29.i686 |
| gpm-devel-1.20.7-6.el7.i686 |
| gpm-libs-1.20.7-6.el7.i686 |
+--------------------------------+

case 2 (unexpected): $ cat sample.txt|csvq -n "select * where c1 like '%i_86'"
+------------------------------+
| c1 |
+------------------------------+
| gpm-devel-1.20.7-6.el7.i686 |
+------------------------------+

case 3 (expected): $ cat sample.txt|csvq -n "select * where c1 like '%.i_86'"
+--------------------------------+
| c1 |
+--------------------------------+
| glibc-2.28-9.fc29.i686 |
| glibc-devel-2.28-9.fc29.i686 |
| glibc-headers-2.28-9.fc29.i686 |
| gpm-devel-1.20.7-6.el7.i686 |
| gpm-libs-1.20.7-6.el7.i686 |
+--------------------------------+

@ken3 ken3 changed the title special character '_' behavior in LIKE pattern special character behavior in LIKE pattern Jan 14, 2020
@mithrandie
Copy link
Owner

I confirmed to replicate this bug.
Please wait to fix.

mithrandie added a commit that referenced this issue Jan 14, 2020
- Fix a bug of LIKE operator. ([Github #25](#25))
@mithrandie
Copy link
Owner

This bug has been fixed and the fix is released as version 1.12.2.
Thank you for reporting.

@ken3
Copy link
Author

ken3 commented Jan 15, 2020

Excellent work! Thank you.

mithrandie added a commit that referenced this issue May 17, 2020
- Support LATERAL join. ([Github #24](#25))
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

2 participants