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

Advanced filter select distinct behaves differently from table operation select distinct on object columns #5280

Open
jjbrosnan opened this issue Mar 22, 2024 · 2 comments
Assignees
Labels
bug Something isn't working core Core development tasks March2024
Milestone

Comments

@jjbrosnan
Copy link
Contributor

Description

If using advanced filters from the GUI to pick distinct values in a column, there are a large number of repeated identical values if doing so on an object or pyobject column.

Steps to reproduce

From the server-side Python API:

from deephaven import empty_table

def foo(idx):
    if idx % 2 == 0:
        return 3
    else:
        return None

t = empty_table(20).update("X = foo(i)")
t2 = empty_table(20).update("X = (Object)foo(i)")

Then, call select_distinct on either table. The result has 2 rows as expected.
Lastly, use the advanced filters from the GUI on the X column. There are numerous repeated 3 entries, and a single null entry.

Expected results

The GUI advanced filters to look the same as the select_unique table operation.

Actual results

Numerous repeated identical values in the GUI advanced filter menu.

Additional details and attachments

Versions

  • Engine Version: edge (0.34.0+snapshot)
  • Web UI Version: edge
  • Java Version: ...
  • Barrage Version: ...
  • OS: OS X
  • Browser: Chrome
  • Docker: 20.10.13
@jjbrosnan jjbrosnan added bug Something isn't working triage labels Mar 22, 2024
@nbauernfeind nbauernfeind transferred this issue from deephaven/web-client-ui Mar 22, 2024
@nbauernfeind nbauernfeind added core Core development tasks NoDocumentationNeeded NoReleaseNotesNeeded No release notes are needed. and removed triage labels Mar 22, 2024
@nbauernfeind nbauernfeind self-assigned this Mar 22, 2024
@nbauernfeind nbauernfeind added this to the 1. March 2024 milestone Mar 22, 2024
@hhashim1
Copy link

hhashim1 commented Mar 25, 2024

In addition to UI being unable to filter, the issue is also present when querying. Neither of the below lines has an outcome. The query lines are ignored. The originating column is a string datatype (see attached image) with values being -2,0, or 2.

image

f"atr_bullish_breakout_{k}_{tf} = ((atr_stop_type_diff_{k}_{tf} == 2))",
f"atr_bearish_breakout_{k}_{tf} = ((atr_stop_type_diff_{k}_{tf} == (double)-2))",

@nbauernfeind
Copy link
Member

Ryan Says:

selectDistinct on the underlying table, not the previewed table, then apply previews to the result, and maybe have a clear way to "reverse" previews to make sure the selection picks the right value.
Disable these kinds of widgets on preview columns, since they're hard to get right.

#5281 (comment)

Otherwise, I've merged a band-aid that makes the widget look sane even if we probably don't want to support filtering previewed columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Core development tasks March2024
Projects
None yet
Development

No branches or pull requests

5 participants