You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2023/10/01 10:56:20 UTC
[arrow-testing] branch master updated (37f2951 -> 48672a3)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-testing.git
from 37f2951 Add simple_enum.avro and simple_fixed.avro (#92)
add 4fe1c74 Update nested_redords.avro to support nullable records
new 48672a3 Update nested_redords.avro to support nullable records (#94)
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
data/avro/nested_records.avro | Bin 619 -> 927 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
[arrow-testing] 01/01: Update nested_redords.avro to support nullable records (#94)
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-testing.git
commit 48672a3cbe7f84cc2ddda0023c6e3698f7539a99
Merge: 37f2951 4fe1c74
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Sun Oct 1 06:56:13 2023 -0400
Update nested_redords.avro to support nullable records (#94)
This PR proposes to update `nested_recods.avro` to support nullable
records.
This change is necessary for [this
PR](https://github.com/apache/arrow-datafusion/pull/7663).
This change appends new fields `f3` and `f4` to the existing schema (the
last two fields).
`f3` is nullable record, and `f4` is array of nullable record.
```
{
"name": "record1",
"namespace": "ns1",
"type": "record",
"fields": [
{
"name": "f1",
"type": {
"name": "record2",
"namespace": "ns2",
"type": "record",
"fields": [
{
"name": "f1_1",
"type": "string"
}, {
"name": "f1_2",
"type": "int"
}, {
"name": "f1_3",
"type": {
"name": "record3",
"namespace": "ns3",
"type": "record",
"fields": [
{
"name": "f1_3_1",
"type": "double"
}
]
}
}
]
}
}, {
"name": "f2",
"type": "array",
"items": {
"name": "record4",
"namespace": "ns4",
"type": "record",
"fields": [
{
"name": "f2_1",
"type": "boolean"
}, {
"name": "f2_2",
"type": "float"
}
]
}
}, {
"name": "f3",
"type": [
"null",
{
"name": "record5",
"namespace": "ns5",
"type": "record",
"fields": [
{
"name": "f3_1",
"type": "string"
}
]
}
],
"default": null
}, {
"name": "f4",
"type": "array",
"items": [
"null",
{
"name": "record6",
"namespace": "ns6",
"type": "record",
"fields": [
{
"name": "f4_1",
"type": "long"
}
]
}
]
}
]
}
```
And the data represented in JSON is as follows.
```
{"f1":{"f1_1":"aaa","f1_2":10,"f1_3":{"f1_3_1":3.14}},"f2":[{"f2_1":true,"f2_2":1.2000000476837158},{"f2_1":true,"f2_2":2.200000047683716}],"f3":{"f3_1":"xyz"},"f4":[{"f4_1":200},null]}
{"f1":{"f1_1":"bbb","f1_2":20,"f1_3":{"f1_3_1":3.14}},"f2":[{"f2_1":false,"f2_2":10.199999809265137}],"f3":null,"f4":[null,{"f4_1":300}]}
```
data/avro/nested_records.avro | Bin 619 -> 927 bytes
1 file changed, 0 insertions(+), 0 deletions(-)