Skip to content

Commit bf44b88

Browse files
authored
Merge pull request #160201 from aerfrei/backport24.3-160093
release-24.3: sql/export: skip columns with Bit(0) type in parquet test
2 parents bdf73fa + d79cb52 commit bf44b88

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pkg/sql/importer/exportparquet_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,22 @@ func TestRandomParquetExports(t *testing.T) {
229229
require.NoError(t, err)
230230

231231
for _, col := range cols {
232+
// Skip tables with BIT(0) columns (or arrays of BIT(0)).
233+
// The testutils parquet decoder cannot decode these as
234+
// into the expected empty bit array and decodes the as
235+
// nil. Ignore these to avoid these flakes.
236+
colTyp := col.Typ
237+
if colTyp.Family() == types.ArrayFamily {
238+
colTyp = colTyp.ArrayContents()
239+
}
240+
if colTyp.Family() == types.BitFamily && colTyp.Width() == 0 {
241+
// We skip these because of the aforementioned
242+
// decoder issue.
243+
t.Logf("skipping table '%s' because it has BIT(0) column '%s' (type: %s)",
244+
tableName, col.Name, colTyp.String())
245+
return fmt.Errorf("table has BIT(0) column")
246+
}
247+
232248
// TODO(#104278): don't call this function to check if a type is supported.
233249
// We should explicitly use the ones supported by util/parquet).
234250
_, err := parquet.NewSchema([]string{"test"}, []*types.T{col.Typ})

0 commit comments

Comments
 (0)