Skip to content

FIREFLY-49: Table filter shows 'null' in the column category but fails to filter #823

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 17, 2019

Conversation

loitly
Copy link
Contributor

@loitly loitly commented Jun 11, 2019

https://jira.ipac.caltech.edu/browse/FIREFLY-49
There's a test table file attached to the ticket. It has a variety of null situations.
You may upload it to test: https://irsawebdev9.ipac.caltech.edu/FIREFLY-49/firefly/

  • substitute NULL with %NULL so it can be used in an IN condition
  • show NULL as and empty string as <EMPTY_STR>
  • added same behavior to client table
  • added IS and IS NOT support for client table
  • added multiple tests
  • added clear link to column's enum values drop-down
  • fix AsyncTapQuery not failing on UNKNOWN returned state

BTW,
A good client side table to test is Images -> View HiPS Images
Also, a good server-side table to test.
https://irsawebdev9.ipac.caltech.edu/FIREFLY-49/firefly/firefly-dev.html
TAP Searches -> ADQL -> CADC -> ivoa.ObsCore

…s to filter

- substitue NULL with %NULL so it can be used in an IN condition
- show NULL as <NULL> and empty string as <EMPTY_STR>
- add same behavior to client table
- add IS and IS NOT support for client table
- add multiple tests
- add clear link to column's enum values drop-down
- fix AsyncTapQuery not failing on UNKNOWN returned state
@loitly loitly requested a review from ejoliet June 11, 2019 20:47
@loitly loitly self-assigned this Jun 11, 2019
@ejoliet ejoliet requested review from cgelino and Olga9999 June 11, 2019 22:13
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.

Looks good to me!
Very useful to the added tests!

A side comment or issue i've noticed, when i open the link to test, i see after couple of seconds/minute a popup with workspace login error:
Workspace access request sending error: n.json is not a function. (In 'n.json()', 'n.json' is undefined)

Might be something happening right now in IRSA (seems DOS attack ongoing - see IRSA slack channel)

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.

Filtering through the drop down menu and check boxes works as expected. However, typing IN ('%NULL') in the filter box does not work.
Steps:

  • open the filter bar, select and m31 from the drop down box.
  • note the filtered rows and the text in the filter box ("in ('%NULL','m31')")
  • delete " '%NULL', " from the filter text box and hit return. The correct row is returned. Look at the check boxes in the drop down and note that only m31 is selected.
  • add " '%NULL', " back to the filter text box and hit return. The rows with null for objname are not returned. Note that the check box next to is selected in the drop down menu.

A couple other bugs I noticed while testing.

  • Do a valid filter on objname.
  • Type in some garbage string into ra or dec to filter on and hit return. An error comes up as expected.
  • Hit the Back button. Two things happen
  1. The table is returned with the properly filtered rows, but now the row with the filter text boxes is missing. The funnel icon is set to clear the filters. You have to clear the filters and click the funnel again to bring back the filter text boxes.
  2. The coverage map disappears and only comes back when you reload the page

- fail on 'in' instead of 'IN'
- on table error, a 'Back' reset everything causes Coverage to fail
@loitly
Copy link
Contributor Author

loitly commented Jun 12, 2019

#823 (review)
@cgelino , thanks for the testing. I've fixed the problems reported and the test link above is updated with the changes.

The table is returned with the properly filtered rows, but now the row with the filter text boxes is missing. The funnel icon is set to clear the filters. You have to clear the filters and click the funnel again to bring back the filter text boxes.

The hidden filtered row is fixed. However, you don't have to clear filters to show/hide the filter header. The funnel with a crossed out circle is for clearing. It only appears when there are filters applied to the table. The funnel icon with or without a numbered badge is to show/hide the filtered row. It will always be there next to the TEXT icon.

Copy link

@olgapevunova olgapevunova left a comment

Choose a reason for hiding this comment

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

-After loading supplied table and experimenting with it, it looks like
filtering is mostly working. I was using similar way as Chris.
Also was checking
coordinates filtering, all is working fine. Little bit of puzzle, when I do put in coords
boxes into filtering any not existing numbers in ra or dec, I get
"No data match these criteria"- correctly , but the plot is spinning and spinning, not sure if it
should try to plot not existing points....

When I put in filter box 'is NULL', it brings only lines with "null", but
not the one with "NULL" in it...
But, when I put there "is null' it works right, brings only 2 rows with 'null'

if I put in filter box 'is not NULL', it filters out only "null" values in objname, but line with "NULL" in objname is still there.
"is not null" works correctly.
When I put in fiter text box "is m41" and try filtering I get :
Table Load Error:

unexpected token: M41
"objname" is m41
...
the same result with submitted 'is not m41' text.

I also read and checked the Chris's comments and seems like it was fixed
between his report and me looking and testing.
Those Chris's ones:

Do a valid filter on objname.
Type in some garbage string into ra or dec to filter on and hit return. An error comes up as expected.
Hit the Back button. Two things happen

The table is returned with the properly filtered rows, but now the row with the filter text boxes is missing. The funnel icon is set to clear the filters. You have to clear the filters and click the funnel again to bring back the filter text boxes.
The coverage map disappears and only comes back when you reload the page

Above 2 things are working fine now(olga)
Olga

@loitly
Copy link
Contributor Author

loitly commented Jun 17, 2019

@olgapevunova Thank you for testing. In regard to null, NullString value of this table is null. Where you see null, it means NULL_VALUE. When you filter on is null or is NULL, it will returns rows where objname contains NULL_VALUE.
The reason why you don't see NULL is because NULL in this case is a string "NULL".

As for is operator, it can only be used on null condition. If you want to filter on rows where objname is 'm41', you would say: = 'm41' for exact match or like '%m41%' for partial match.

Does that answer all of your questions?

@cgelino if my latest commit satisfy your change request, please approve. Thanks.

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.

Loi explained the things I have had problems with understanding how they work, so
I got it, and now agree to approve the fix.
Olfa

@cgelino
Copy link

cgelino commented Jun 17, 2019

The bugs I had reported previously have been fixed.

@loitly loitly merged commit c7f261f into dev Jun 17, 2019
@loitly loitly deleted the FIREFLY-49_null_enum_val branch June 17, 2019 18:21
@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.

6 participants