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/09/25 20:51:02 UTC
[arrow-testing] 01/01: Add simple_enum.avro and simple_fixed.avro (#92)
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 37f29510ce97cd491b8e6ed75866c6533a5ea2a1
Merge: 2c84953 3f68d1a
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Mon Sep 25 16:50:56 2023 -0400
Add simple_enum.avro and simple_fixed.avro (#92)
This PR proposes to add `simple_enum.avro` and `simple_fixed.avro` which
contain Avro's `Enum` and `Fixed`.
These files are necessary for [this
PR](https://github.com/apache/arrow-datafusion/pull/7635).
The schema and data represented as JSON included in the files are like
as follows.
* simple_enum.avro
```
{
"name": "record1",
"namespace": "ns1",
"type": "record",
"fields": [
{
"name": "f1",
"type": {
"name": "enum1",
"type": "enum",
"symbols": ["a", "b", "c", "d"],
"default": "a"
}
}, {
"name": "f2",
"type": {
"name": "enum2",
"namespace": "ns2",
"type": "enum",
"symbols": ["e", "f", "g", "h"],
"default": "e"
}
}, {
"name": "f3",
"type": {
"name": "union1",
"type": [
"null",
{
"name": "enum3",
"type": "enum",
"symbols": ["i", "j", "k"],
"default": "i"
}
]
}
}
]
}
```
```
{"f1":"a","f2":"g","f3":"j"}
{"f1":"b","f2":"h","f3":"k"}
{"f1":"c","f2":"e","f3":null}
{"f1":"d","f2":"f","f3":"i"}
```
* simple_fixed
```
{
"name": "record1",
"type": "record",
"namespace": "ns1",
"fields": [
{
"name": "f1",
"type": {
"name": "fixed1",
"type": "fixed",
"size": 5
}
}, {
"name": "f2",
"type": {
"name": "fixed2",
"namespace": "ns2",
"type": "fixed",
"size": 10
}
}, {
"name": "f3",
"type": {
"name": "union1",
"type": [
"null",
{
"name": "fixed3",
"type": "fixed",
"size": 6
}
]
}
}
]
}
```
```
{"f1":[97,98,99,100,101],"f2":[102,103,104,105,106,107,108,109,110,111],"f3":[65,66,67,68,69,70]}
{"f1":[49,50,51,52,53],"f2":[49,50,51,52,53,54,55,56,57,48],"f3":null}
```
data/avro/README.md | 4 +++-
data/avro/simple_enum.avro | Bin 0 -> 411 bytes
data/avro/simple_fixed.avro | Bin 0 -> 388 bytes
3 files changed, 3 insertions(+), 1 deletion(-)