Closed mdisibio closed 1 year ago
I'll try to take a look at this one later today
@kevinburkesegment, any progress on this one? Is there any info we can provide to help diagnose?
@joe-elliott @mdisibio to be clear - is this an expected error? Did the row actually have zero values in this case?
rs → ils → Spans → Links → no values found in parquet row for column 44
If I am reading this right this is on the path from turning a Go struct into a Parquet file, so maybe the issue is we are building the Parquet file incorrectly?
Like it's easy enough to stop the panic by checking if there are zero values in the row but maybe that reflects an error higher up in processing where we are allowing the creation of a zero-value row.
We received this error when we added the Links field to our schema while iterating old blocks that did not have the field.
The error was intermittent though. Most of the time we could iterate blocks using the ReadRows w/o issue, but sometimes it would fail with this error. Presumably none of the rows had the Links field, but it only seemed to matter occasionally. Marty is currently on PTO and will likely have more detailed info.
We most often saw this while iterating all rows in a parquet file using ReadRows. The stack trace above is a bit different because it is from a "trace by id" lookup. This is the only time we saw it in this context. @mdisibio is on PTO but will have more context when he returns.
OK. Achille is also on PTO and would likely be able to solve this within a few minutes
some discussion in the meeting - returning an error is also wrong. if the row had no values we'd expect it to be nil.
Hi. Any news?
I have found a difference in the values for the Links column between the older files that exhibit the error, and newer files that are ok, and also identified a potential fix.
parquet.Row printouts
The below snippets were gathered by calling reader.ReadRows()
and then printing array of values.
In the older file that exhibits the error, the trace contains 6 spans but there is only a single Links
and DroppedLinksCount
written for the entire trace. Columns immediately before and after contain 6 values like expected.
row[270] v: 0 r: 0 d: 3 c: 43 rs.ils.Spans.DroppedEventsCount
row[271] v: 0 r: 3 d: 3 c: 43 rs.ils.Spans.DroppedEventsCount
row[272] v: 0 r: 3 d: 3 c: 43 rs.ils.Spans.DroppedEventsCount
row[273] v: 0 r: 3 d: 3 c: 43 rs.ils.Spans.DroppedEventsCount
row[274] v: 0 r: 3 d: 3 c: 43 rs.ils.Spans.DroppedEventsCount
row[275] v: 0 r: 3 d: 3 c: 43 rs.ils.Spans.DroppedEventsCount
row[276] v: <null> r: 0 d: 0 c: 44 rs.ils.Spans.Links <--- here
row[277] v: <null> r: 0 d: 0 c: 45 rs.ils.Spans.DroppedLinksCount <---
row[278] v: <null> r: 0 d: 3 c: 46 rs.ils.Spans.HttpMethod
row[279] v: <null> r: 3 d: 3 c: 46 rs.ils.Spans.HttpMethod
row[280] v: <null> r: 3 d: 3 c: 46 rs.ils.Spans.HttpMethod
row[281] v: <null> r: 3 d: 3 c: 46 rs.ils.Spans.HttpMethod
row[282] v: <null> r: 3 d: 3 c: 46 rs.ils.Spans.HttpMethod
row[283] v: GET r: 3 d: 4 c: 46 rs.ils.Spans.HttpMethod
In newer written files there is an empty slice for each Span. This example is from 2 empty Spans:
row[66] v: 0 r: 0 d: 3 c: 43 rs.ils.Spans.DroppedEventsCount
row[67] v: 0 r: 3 d: 3 c: 43 rs.ils.Spans.DroppedEventsCount
row[68] v: r: 0 d: 3 c: 44 rs.ils.Spans.Links
row[69] v: r: 3 d: 3 c: 44 rs.ils.Spans.Links
row[70] v: 0 r: 0 d: 3 c: 45 rs.ils.Spans.DroppedLinksCount
row[71] v: 0 r: 3 d: 3 c: 45 rs.ils.Spans.DroppedLinksCount
row[72] v: <null> r: 0 d: 3 c: 46 rs.ils.Spans.HttpMethod
row[73] v: <null> r: 3 d: 3 c: 46 rs.ils.Spans.HttpMethod
Theory
I believe in reconstructFuncOfRepeated
, it does not account for the single null defined at a lower definition level. k
starts at 1 and the expectation is that at least 1 value exists for every leaf (the second printout) that is consumed by each reconstruction call.
This doesn't seem to be related to schema conversion, since the Links
and DroppedLinksCount
columns are present in both files.
Fix Totally unsure how appropriate this is, but amending the logic to substitute a null when value missing appears to work ok.
for i := 0; i < n; i++ {
for j, column := range values {
column = column[:cap(column)]
if len(column) == 0 {
// This means this column was defined null at a higher definition level,
// so substitute a single null value here and continue
values[j] = append(values[j], Value{})
continue
}
k := 1
...
After upgrading library to the latest, getting a panic in
reader.Read()
. This occurs with bothparquet.NewGenericReader
andparquet.NewReader
. Unfortunately I don't have a sanitized file that reproduces this that I can share.Context We were originally investigating a different but possibly related error on the previous version
20221209072905-710d87d50dd1
. When reading the same row we received:but after the upgrade it yields a panic.