We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is an issue when writing OCR with a schema containing union type.
I've changed your example like this:
avroSchema := ` { "type": "record", "name": "test_schema", "fields": [ { "name": "time", "type": "long" }, { "name": "customer", "type": ["null", "string"], "default": null } ] }` // Writing OCF data var ocfFileContents bytes.Buffer writer, err := goavro.NewOCFWriter(goavro.OCFConfig{ W: &ocfFileContents, Schema: avroSchema, }) if err != nil { fmt.Println(err) } err = writer.Append([]map[string]interface{}{ { "time": 1617104831727, "customer": "customer1", }, { "time": 1717104831727, "customer": "customer2", }, }) fmt.Println("ocfFileContents", ocfFileContents.String())
The output doesn't contains data.
But if I set nil for customer the data are written.
nil
err = writer.Append([]map[string]interface{}{ { "time": 1617104831727, "customer": nil, }, { "time": 1717104831727, "customer": nil, }, })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There is an issue when writing OCR with a schema containing union type.
I've changed your example like this:
The output doesn't contains data.
But if I set
nil
for customer the data are written.The text was updated successfully, but these errors were encountered: