You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Zui's ZSON-like output often leaves out some/all union type decorators. The user should have some way to make sure this is included when they want to see it.
As shown in the attached video, the union-uint64.zson data is output with one value containing a partial type decorator that cannot be read back in as ZSON. Meanwhile the union-int64.zson data is output with the type decorators left off entirely, such that if read back as ZSON the history of the union type is lost completely.
Repro.mp4
I discussed this one with @mccanne and he was sympathetic to the fact that the type decorators often can make output more difficult to interpret, particularly when they get long. However, one of the strengths of ZSON is that it's in no way "lossy".
Per #2880, I've heard rough consensus that it's good that Zui's Inspector output is very close to ZSON, though things like the numeric array prefixes (0:, 1:, ...) and "..." to truncate long values to fit into the display are reasonable compromises since they are intuitive and can be divulged to users in the docs. Along similar lines, it seems there should be a way to make sure the user is aware when union types are present, even if the decorators are not always printed out in full.
When discussing this with @mccanne, he proposed showing "(...)" as a visual cue that there's a type decorator present and allowing the user to click on it to expand it. I'm a fan of this also. Perhaps some control to "expand/collapse all type decorators" would also be helpful if the user wants to see a lot of this detail at once without having to do lots of clicking.
The text was updated successfully, but these errors were encountered:
tl;dr
Zui's ZSON-like output often leaves out some/all union type decorators. The user should have some way to make sure this is included when they want to see it.
Details
Repro is with Zui commit b426158.
Consider the following ZSON input data that has union types:
As shown in the attached video, the
union-uint64.zson
data is output with one value containing a partial type decorator that cannot be read back in as ZSON. Meanwhile theunion-int64.zson
data is output with the type decorators left off entirely, such that if read back as ZSON the history of the union type is lost completely.Repro.mp4
I discussed this one with @mccanne and he was sympathetic to the fact that the type decorators often can make output more difficult to interpret, particularly when they get long. However, one of the strengths of ZSON is that it's in no way "lossy".
Per #2880, I've heard rough consensus that it's good that Zui's Inspector output is very close to ZSON, though things like the numeric array prefixes (
0:
,1:
, ...) and "..." to truncate long values to fit into the display are reasonable compromises since they are intuitive and can be divulged to users in the docs. Along similar lines, it seems there should be a way to make sure the user is aware when union types are present, even if the decorators are not always printed out in full.When discussing this with @mccanne, he proposed showing "(...)" as a visual cue that there's a type decorator present and allowing the user to click on it to expand it. I'm a fan of this also. Perhaps some control to "expand/collapse all type decorators" would also be helpful if the user wants to see a lot of this detail at once without having to do lots of clicking.
The text was updated successfully, but these errors were encountered: