You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by dk...@apache.org on 2020/05/26 14:58:46 UTC

[avro] branch master updated: Add example schema for date logical type field to spec docs (#834)

This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new a565690  Add example schema for date logical type field to spec docs (#834)
a565690 is described below

commit a565690bdaeb9ad1cc296f3832eb45384dded2a8
Author: Martin Jul <ma...@mjul.com>
AuthorDate: Tue May 26 16:58:35 2020 +0200

    Add example schema for date logical type field to spec docs (#834)
    
    * Add example schema for date logical type field.
    
    * Remove name attribute for consistency as suggested by @RyanSkraba
---
 doc/src/content/xdocs/spec.xml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/doc/src/content/xdocs/spec.xml b/doc/src/content/xdocs/spec.xml
index 6df2a60..cd029d3 100644
--- a/doc/src/content/xdocs/spec.xml
+++ b/doc/src/content/xdocs/spec.xml
@@ -1523,6 +1523,13 @@ void initFPTable() {
         <p>
           A <code>date</code> logical type annotates an Avro <code>int</code>, where the int stores the number of days from the unix epoch, 1 January 1970 (ISO calendar).
         </p>
+        <p>The following schema represents a date:</p>
+        <source>
+{
+  "type": "int",
+  "logicalType": "date"
+}
+        </source>
       </section>
 
       <section>