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

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

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


##########
go/parquet/pqarrow/schema.go:
##########
@@ -948,7 +957,21 @@ func getNestedFactory(origin, inferred arrow.DataType) func(fieldList []arrow.Fi
 func applyOriginalStorageMetadata(origin arrow.Field, inferred *SchemaField) (modified bool, err error) {
 	nchildren := len(inferred.Children)
 	switch origin.Type.ID() {
-	case arrow.EXTENSION, arrow.SPARSE_UNION, arrow.DENSE_UNION:
+	case arrow.EXTENSION:
+		extType := origin.Type.(arrow.ExtensionType)
+		modified, err = applyOriginalStorageMetadata(arrow.Field{
+										 Type: extType.StorageType(), 
+										 Metadata: arrow.NewMetadata(
+																[]string{ipc.ExtensionTypeKeyName, ipc.ExtensionMetadataKeyName},
+																[]string{extType.ExtensionName(), extType.Serialize()}),
+							 }, inferred)
+		if err != nil {
+				return
+		}

Review Comment:
   Fixed



-- 
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