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
Named types are currently being rendered in Zui with extra parens (e.g., port=(uint16)) but in the Zed tooling this has been simplified to drop those (e.g., port=uint16).
Update: In the time since this issue was first opened, we've spotted some additional bugs with the rendering of named types. See the comment below for details.
brimdata/super#5000 (review) includes a summary of when we changed the ZSON syntax for named types and only recently updated the docs to reflect this. This is another whack-a-mole case such as described in #2880.
The attached video shows the current difference between Zui's presentation and that of the Zed tooling using this input data.zson:
{p1:80 (port=uint16), p2: 8080 (port)}
Repro.mp4
If a user were to cut & paste the current ZSON-like text out of Zui and try to use it as ZSON input data, it would cause an error.
$ zq -version
Version: v1.12.0-41-g9e952f36
$ echo '{ p1: 80 ( port=(uint16)) , p2: 8080 ( port=(uint16)) }' | zq -i zson -
stdio:stdin: parse error: type list not found parsing union type at '('
The text was updated successfully, but these errors were encountered:
In the time since this issue was first opened, we've spotted some additional problems with the rendering of named types. The repro below is at Zui commit 67797fd and uses the following input data.zson:
The attached video shows three problems related to the named type in this data:
There's no leading = shown in the type decorator for AnotherName like we see in the ZSON rendering from the CLI tooling. As the ZSON spec describes, the = is necessary when it's defined as a new type but then can be dropped in later references.
In the Columns picker, the nested field foo is not shown for the nested record that's a named type. This symptom was first reported to us by a community zync user.
The named type is described in the Columns picker as an <alias>, but this terminology has been purged from Zed in favor of "named type". In any case, for the purposes of what's shown in the Column picker, I imagine labeling it <record> is probably still appropriate, though it may be worth polling the Zed dev team for input as well.
Repro.mp4
philrz
changed the title
Named types are rendered with extra parens
Bugs with rendering of named types
Feb 8, 2024
tl;dr
Named types are currently being rendered in Zui with extra parens (e.g.,
port=(uint16)
) but in the Zed tooling this has been simplified to drop those (e.g.,port=uint16
).Update: In the time since this issue was first opened, we've spotted some additional bugs with the rendering of named types. See the comment below for details.
Details
Repro is with Zui commit b413f0c.
brimdata/super#5000 (review) includes a summary of when we changed the ZSON syntax for named types and only recently updated the docs to reflect this. This is another whack-a-mole case such as described in #2880.
The attached video shows the current difference between Zui's presentation and that of the Zed tooling using this input
data.zson
:Repro.mp4
If a user were to cut & paste the current ZSON-like text out of Zui and try to use it as ZSON input data, it would cause an error.
The text was updated successfully, but these errors were encountered: