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
tl;dr - The following input data has two different types for the same field foo. When fused and output as CSV, there's an unexpected appearance of the type decorator for the created union.
Here's a detailed history of how we got to this spot...
Up to a very old commit 7d8f1e5 (from July, 2021), fusing and outputting this as CSV resulted in an additional column with a _2 appended to its name to represent data with the second data type encountered for foo.
To format a Zed union, zio/csvio.Writer.Write calls through formatValue
to zson.String, producing a string that includes an unwanted ZSON union
type decorator. Remove that type decorator by calling zed.Value.Under
in Write.
Closes#4207.
To format a Zed union, zio/csvio.Writer.Write calls through formatValue
to zson.String, producing a string that includes an unwanted ZSON union
type decorator. Remove that type decorator by calling zed.Value.Under
in Write.
Closes#4207.
Alas, while this covers a case involving the union of two primitive types, I've now noticed a different kind of CSV output problem related to the union of a primitive and complex type. I've opened a new issue #4342 to track that.
Current repro is with Zed commit 375f11d.
tl;dr - The following input data has two different types for the same field
foo
. When fused and output as CSV, there's an unexpected appearance of the type decorator for the created union.Here's a detailed history of how we got to this spot...
Up to a very old commit 7d8f1e5 (from July, 2021), fusing and outputting this as CSV resulted in an additional column with a
_2
appended to its name to represent data with the second data type encountered forfoo
.Then starting with the following commit 3b0f493 (associated with #2885), the output changed to the strange-looking:
It looks like those
0
and1
were references to numbered type definitions that are leaking out.Then it changed again at commit 547a203 (associated with #3129) when the leaking became more obvious.
Finally, it changed one more time at commit 942500c (associated with #3487), which is the output that's still with us today.
The text was updated successfully, but these errors were encountered: