Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-17627

[GO][Parquet] Unable to pass metadata without StoreSchema

    XMLWordPrintableJSON

Details

    Description

      https://github.com/apache/arrow/blob/master/go/parquet/pqarrow/file_writer.go#L75

       

      Right now the only way to pass in KV metadata is to enable StoreSchema and pass it as part of the schema. In otherwise we can't pass through metadata without also store ARROW:schema

       

      I suggest change it to the following

       

      	meta := make(metadata.KeyValueMetadata, 0)
      	for i := 0; i < arrschema.Metadata().Len(); i++ {
      		meta.Append(arrschema.Metadata().Keys()[i], arrschema.Metadata().Values()[i])
      	}
      
      	if arrprops.storeSchema {
      
      		serializedSchema := flight.SerializeSchema(arrschema, props.Allocator())
      		meta.Append("ARROW:schema", base64.StdEncoding.EncodeToString(serializedSchema))
      	}
      

       

      Attachments

        Issue Links

          Activity

            People

              zeroshade Matthew Topol
              zhouyan1014 Yan Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h