Open niloc132 opened 1 month ago
I'm not certain that PartitionedTable and PartitionAwareSourceTable should be displayed in the same way.
Note #2066 and #2049 were addressed after discussion with @rbasralian and @rcaudy in #2079, there are differences in how they display.
Unfortunately, at least for the "Merge" vs "Uncoalesce" button text difference, it isn't working, at least in my testing, and the uncoalesced tables are briefly loading the entire coalesced contents, which is incredibly expensive in some cases.
the uncoalesced tables are briefly loading the entire coalesced contents, which is incredibly expensive in some cases.
This part we definitely need to fix. There may be some more discussion about some of the other behaviours.
Presently, the web UI seems to share too much between PartitionedTables and uncoalesced Tables. Recapping briefly, a PartitionedTable is a kind of widget, while a Table that is uncoalesced has no size and returns
true
for isUncoalesced. The distinction is meaningful, in that a PartitionedTable is a Table that has since been partitioned, while an uncoalesced Table represents many tables on disk that have not been read yet and should not be read until the user either selects a partition or explicitly requests that the table be coalesced.From https://github.com/deephaven/web-client-ui/issues/2066
From https://github.com/deephaven/web-client-ui/issues/2049
Note that some uncoalesced tables have zero partitions - in this case, they can and should be immediately coalesced, as there is only one table on disk (see https://github.com/deephaven/web-client-ui/issues/1763 and I think https://github.com/deephaven/web-client-ui/issues/1904).
Testing to try:
Multiple parquet partitions
This will produce an uncoalesced table with two partitions and one partition column - data should not be visible until a partition is selected
No partition columns (and so, only one partition)
This will produce an uncoalesced table with one partition and no partition columns - data should be visible right away, and no partition selector
Empty table, multiple partitions
I'm not entirely sure what we expect here, but we should not coalesce, as there could be many empty partitions, and reading those partitions is expensive, even though they are empty (consider if each was on S3 and we needed a roundtrip to there). We probably should inform the user that there are no partitions, but not subscribe to the data itself.
This should probably show a partition selector, even though there are (presently) no partitions to select?
Empty table, no partition columns
In this case, as with the other one partition case, we can simply subscribe. The important distinction here is that while the table is still empty (as in the previous case), there are no partitioned columns.
Partitioned columns exist, only one partition
While we still don't want to coalesce, we can display the initial partition, so data will be visible. I believe this is how we already handle cases when many partitions are present, so this is only present to validate that it still works
Partitioned columns exist, no partitions
I'm not sure if this case is really possible at this time with parquet.
This results in an error.
PartitionedTable widget
This could be for zero to many partitions, though a PartitionedTable always has at least one partitioned column (aka "key columns").