Skip to content

FIREFLY-59: Filtering fail when value contains semicolon #828

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

Merged
merged 2 commits into from
Jun 26, 2019

Conversation

loitly
Copy link
Contributor

@loitly loitly commented Jun 20, 2019

ticket: https://jira.ipac.caltech.edu/browse/FIREFLY-59
test: https://irsawebdev9.ipac.caltech.edu/FIREFLY-59/firefly/firefly-dev.html

As reported, filtering fail when the value contains semicolon. Because we were using semicolon to separate conditions, this messes up the underlying query statement.

Instead of just fixing the problem, I went ahead and allow the conditions delimiter to be either AND or OR. Although this added a useful requested feature, it also may require updates to our online help. Please coordinate with the appropriate people after merging.

Sample conditions:
> 0 and < 50 or is NULL
< 0 or > 100
in ('m31', 'm41') or is NULL

- added ability to separate condition with 'and' or 'or'
@loitly loitly requested review from ejoliet and xiuqin June 20, 2019 19:05
@loitly loitly self-assigned this Jun 20, 2019
@ejoliet ejoliet requested review from Olga9999 and cgelino June 20, 2019 21:22
@vandesai1
Copy link

Just tried it. Looks good.

@xiuqin
Copy link
Contributor

xiuqin commented Jun 21, 2019

Definitely a good improvement using 'AND' 'OR' for conditions. This was something we wanted to add for some time. I see that the tooltip has been changed to reflect this new capability. Great job!

Copy link

@cgelino cgelino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that AND and OR filtering works as expected. Semicolon filters do not work as expected.

A couple of unrelated things:

  1. I couldn't query the NEOWISE-R Single Exposure DB. This is also a problem on ops, so I'll send IRSA a ticket.
  2. Putting a string in double quotes instead of single quotes has some weird consequences. Sometimes the string is ignored (is "blah" -> is NULL) and sometimes it tries to be parsed as is (= "blah" -> ='"blah"').

Copy link

@Olga9999 Olga9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was testing test case from FF-59 JIRA ticket for the dealing with semicolon in the UCD column of the
Gaia tap service table.
It works.

@loitly
Copy link
Contributor Author

loitly commented Jun 21, 2019

2. Putting a string in double quotes instead of single quotes has some weird consequences. Sometimes the string is ignored (is "blah" -> is NULL) and sometimes it tries to be parsed as is (= "blah" -> ='"blah"').

  • is and is not can only be used with NULL. That's why auto-correct replace everything after that with NULL. This is something I am not sure of. I can either auto-correct, or let is error out when it's not NULL.
  • String literal must be enclosed in single-quotes. When it's not, auto-correct will add it.

Copy link
Contributor

@ejoliet ejoliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I played with it and it’s a great and helpful improvement! Also noticed updated test! Thanks also for updating the tooltip! Awesome!

Good to be merged.

@loitly loitly merged commit 34c6736 into dev Jun 26, 2019
@loitly loitly deleted the FIREFLY-59_filter_semicolon branch June 26, 2019 00:57
@robyww robyww added bug Table Changes to table or table model labels Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Table Changes to table or table model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants