zeroshade commented on code in PR #852:
URL: https://github.com/apache/arrow-go/pull/852#discussion_r3439174101
##########
parquet/file/column_writer_types.gen.go.tmpl:
##########
@@ -269,6 +269,97 @@ func (w *{{.Name}}ColumnChunkWriter)
WriteBatchSpaced(values []{{.name}}, defLev
{{- end}}
}
+// WriteBatchSpacedWithError behaves like WriteBatchSpaced but reports a write
+// failure as an error instead of panicking or silently discarding it,
+// mirroring the error handling of WriteBatch. Prefer this method on write
+// paths whose sink may fail (for example a network-attached writer).
+func (w *{{.Name}}ColumnChunkWriter) WriteBatchSpacedWithError(values
[]{{.name}}, defLevels, repLevels []int16, validBits []byte, validBitsOffset
int64) (valueOffset int64, err error) {
Review Comment:
Pushed `f4b92fc5` to address the panic-payload nuance I mentioned above.
The deprecated `WriteBatchSpaced` / `WriteBitmapBatchSpaced` now re-panic
the **unwrapped** cause (via a small shared `panicCause` helper) instead of
`panic(err)`, so the byte-array / FLBA paths surface the original error value
again rather than the `FormatRecoveredError("unknown error type", …)` wrapper
they'd otherwise inherit from delegating through `…WithError`. `errors.Is(…,
original)` still resolves, and non-error panics fall back to the wrapper.
Net result: those two paths keep their exact pre-deprecation panic payload,
while the numeric/boolean paths still fail loud instead of silently dropping
the error. `go build`/`vet`/`staticcheck` are clean and the `parquet/file` +
`parquet/pqarrow` suites pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]