Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Create UI to Display Partitioned Tables (#1663)
- `PartitionedTable` objects can now be opened and displayed with a new UI - Supports switching between partitions and viewing the merged or key table - Partition aware parquet tables will also share this new UI - The new UI will no longer allow users to enter invalid partitions - Closes #1143 - Depends on the following changes to core: - deephaven/deephaven-core#4789 - deephaven/deephaven-core#4931 - deephaven/deephaven-core#4940 ### Testing Instructions #### PartitionedTable 1. Run the code and open the table `pt` ```py from deephaven import empty_table _t = empty_table(100).update(["verylongcolumn=(int)Math.floor(i/5)", "veryveryverylongcolumn=i"]) pt = _t.partition_by(["verylongcolumn", "veryveryverylongcolumn"]) ``` 2. Check that the features specified in the [spec](https://user-images.githubusercontent.com/1576283/268390627-d427b993-1d09-43a5-960f-4e6cd0848f36.png) are present: - Resizing the panel horizontally wraps the dropdown without wrapping the '>' - Hovering over the 'Key' and 'Merge' buttons displays the correct labels - The initial partition should be the first valid partition available when all columns are sorted in descending order - Options in the dropdown are displayed in descending order 3. Clicking the 'Key' and 'Merge' tables should correctly display the respective table and the button should visually indicate if one of them is being displayed. All the dropdowns should show empty values while one of the buttons is active. - While one of the toggle buttons is active, only the leftmost dropdown should be enabled 4. After clearing the dropdowns by clicking either the 'Key' or 'Merge' button, selecting any value on any dropdown should automatically set the remaining dropdowns and display a valid partition. 5. Dropdowns should only contain values that are valid with respect to the selected values of all the dropdowns left of it 6. Changing the value of a dropdown should try to preserve dropdowns to the right of it. If this is not possible, the values of the dropdowns right of it should be changed so that a valid partition can be displayed. #### Parquet Tables 1. Run the following code and verify that all tables display and function correctly for every data type ```py from deephaven import empty_table part = empty_table(4).update("II=ii") from deephaven.parquet import write, read write(part, "/tmp/pt-test/intCol=0/part.parquet") write(part, "/tmp/pt-test/intCol=1/part.parquet") int_partition = read("/tmp/pt-test") write(part, "/tmp/string-test/stringCol=hello/part.parquet") write(part, "/tmp/string-test/stringCol=world/part.parquet") string_partition = read("/tmp/string-test") write(part, "/tmp/double-test/doubleCol=1.5/part.parquet") write(part, "/tmp/double-test/doubleCol=2.5/part.parquet") double_partition = read("/tmp/double-test") write(part, "/tmp/char-test/charCol=a/part.parquet") write(part, "/tmp/char-test/charCol=b/part.parquet") char_partition = read("/tmp/char-test") write(part, "/tmp/long-test/longCol=2147483648/part.parquet") write(part, "/tmp/long-test/longCol=2147483650/part.parquet") long_partition = read("/tmp/long-test") write(part, "/tmp/bool-test/boolCol=true/part.parquet") write(part, "/tmp/bool-test/boolCol=false/part.parquet") bool_partition = read("/tmp/bool-test") write(part, "/tmp/multi_test/x=0/y=0/part.parquet") write(part, "/tmp/multi_test/x=0/y=1/part.parquet") write(part, "/tmp/multi_test/x=1/y=0/part.parquet") write(part, "/tmp/multi_test/x=1/y=1/part.parquet") write(part, "/tmp/multi_test/x=1/y=2/part.parquet") multi_partition = read("/tmp/multi_test") ``` --------- Co-authored-by: georgecwan <georgecwan@users.noreply.github.com> Co-authored-by: mikebender <mikebender@deephaven.io>
- Loading branch information