You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/11/04 08:35:48 UTC
[avro] branch avro-3659 created (now f3e8e51cd)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a change to branch avro-3659
in repository https://gitbox.apache.org/repos/asf/avro.git
at f3e8e51cd AVRO-3659: Typo in python example
This branch includes the following new commits:
new f3e8e51cd AVRO-3659: Typo in python example
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.
[avro] 01/01: AVRO-3659: Typo in python example
Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch avro-3659
in repository https://gitbox.apache.org/repos/asf/avro.git
commit f3e8e51cd98384d0c24116612cb322790ddb93e9
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Fri Nov 4 10:34:55 2022 +0200
AVRO-3659: Typo in python example
Fix the type of 'favorite_color' field.
Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
doc/content/en/docs/++version++/Getting started (Python)/_index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/content/en/docs/++version++/Getting started (Python)/_index.md b/doc/content/en/docs/++version++/Getting started (Python)/_index.md
index ded4aca5d..d4a652f3e 100644
--- a/doc/content/en/docs/++version++/Getting started (Python)/_index.md
+++ b/doc/content/en/docs/++version++/Getting started (Python)/_index.md
@@ -128,7 +128,7 @@ We create a DataFileWriter, which we'll use to write serialized items to a data
writer.append({"name": "Alyssa", "favorite_number": 256})
writer.append({"name": "Ben", "favorite_number": 7, "favorite_color": "red"})
-We use DataFileWriter.append to add items to our data file. Avro records are represented as Python dicts. Since the field favorite_color has type ["int", "null"], we are not required to specify this field, as shown in the first append. Were we to omit the required name field, an exception would be raised. Any extra entries not corresponding to a field are present in the dict are ignored.
+We use DataFileWriter.append to add items to our data file. Avro records are represented as Python dicts. Since the field favorite_color has type ["string", "null"], we are not required to specify this field, as shown in the first append. Were we to omit the required name field, an exception would be raised. Any extra entries not corresponding to a field are present in the dict are ignored.
```python
reader = DataFileReader(open("users.avro", "rb"), DatumReader())