Files
seaweedfs/weed/worker/tasks/iceberg/testdata
347f1cf705 deps: bump parquet-go to v0.33.0 (#13130)
* deps: bump parquet-go to v0.33.0

parquet-go v0.33.0 fixes several bugs that Iceberg compaction runs into:

- BOOLEAN columns that Arrow and parquet-mr write with data page v2 are
  RLE-encoded. v0.32.0 decoded such runs wrong (a run's value byte expanded
  bit by bit, runs taken as multiples of 8 values), so compaction rewrote the
  flags wrong, and it wrote its own runs of trues with the value byte 0xFF,
  which DuckDB refuses to read ("Payload value bigger than allowed")
  (parquet-go/parquet-go#617, fixed by parquet-go/parquet-go#620).
- A column chunk without a dictionary lists the level encoding RLE next to
  PLAIN. v0.32.0 took RLE as the column's encoding, so the schema derived from
  a non-dictionary INT32 or DATE file could not write ("RLE: cannot encode
  INT32 with invalid bit-width=0") and such files never compacted
  (parquet-go/parquet-go#603, fixed by parquet-go/parquet-go#611).
- The sorting writer dropped the row groups' geospatial statistics when a
  bin fit in its sort buffer, so a sorted rewrite of a geometry table wrote
  files without a geometry bound (parquet-go/parquet-go#627, fixed by parquet-go/parquet-go#693 and parquet-go/parquet-go#700).
- A null in a list of required values wrote no value and shifted the rest of
  the page (parquet-go/parquet-go#616, fixed by parquet-go/parquet-go#618); a short data page read leftover
  values from a pooled buffer instead of failing (parquet-go/parquet-go#624, fixed by
  parquet-go/parquet-go#731).
- A geometry or geography column declared without a CRS is now written
  without one rather than with OGC:CRS84 spelled out (parquet-go/parquet-go#628, fixed
  by parquet-go/parquet-go#688).

Changes that follow from the bump:

- A corrupt data page now fails with an error rather than a panic. The
  position and equality delete readers returned that error without the file
  name; they now name the file, as the data file merge already does.
- The default-CRS tests built their "spelled out" inputs with
  parquet.Geometry(""), which now writes no CRS; they declare OGC:CRS84
  explicitly. The footer rewrite in geometry_crs.go is still needed when an
  input spells the default out, since the output schema comes from an input.

Tests:

- compact_rle_boolean_test.go with four pyarrow fixtures: two files with
  v2-page RLE booleans (with nulls) read back and compacted with every flag
  kept, and two non-dictionary INT32/DATE files compacted with every value
  kept. All three tests fail on v0.32.0 (3005 of 6000 flags wrong; "no bins
  successfully compacted").
- TestCompactSortedGeometryBoundCoversEveryRow only checked a bound when
  there was one, so it passed with the statistics dropped. It now requires a
  geometry bound on the data file and geometry statistics in the footer; it
  fails on v0.32.0 and passes on v0.33.0.
- go vet and go test of every package that imports parquet-go
  (weed/admin/dash, weed/mq/logstore, weed/mq/schema, weed/query/engine,
  weed/worker/tasks/iceberg) pass; -race on weed/worker/tasks/iceberg and
  weed/mq/logstore passes; go build ./weed passes.

* iceberg: fail the Arrow fixture tests on a read error

Both row-reading loops ended on any error, so rows decoded next to an
error could still pass the value checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* iceberg: check each fixture row comes out of compaction exactly once

A row replaced by a copy of another kept the row count and passed the
value checks, which use the row's own id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:18:24 -08:00
..