You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "disq (via GitHub)" <gi...@apache.org> on 2023/04/03 12:51:35 UTC

[GitHub] [arrow] disq commented on a diff in pull request #34631: GH-34330: [Go][Parquet]: Add Extension type support

disq commented on code in PR #34631:
URL: https://github.com/apache/arrow/pull/34631#discussion_r1155920592


##########
go/arrow/table.go:
##########
@@ -69,7 +69,7 @@ type Column struct {
 // of the ref counting.
 func NewColumnFromArr(field Field, arr Array) Column {
 	if !TypeEqual(field.Type, arr.DataType()) {
-		panic("arrow/array: inconsistent data type")
+		panic(fmt.Sprintf("arrow/array: inconsistent data type %s vs %s", field.Type.String(), arr.DataType().String()))

Review Comment:
   I think having more data in these types of errors is helpful because they don't seem to be day to day errors but errors occurring during development, and having the types in the message removes the 'obvious second step' (ie. running in debugger to investigate) and transforms it into a more actionable, clearer error. There's one more below in L101, also one in the parquet test suite. Easy to revert.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org