You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by zh...@apache.org on 2020/12/20 13:08:34 UTC

[pulsar] branch master updated: Update schema type (#9003)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5f9ecb5  Update schema type (#9003)
5f9ecb5 is described below

commit 5f9ecb5e2c349aa7190ced3a34ddb7c3d3c84c61
Author: HuanliMeng <48...@users.noreply.github.com>
AuthorDate: Sun Dec 20 21:08:09 2020 +0800

    Update schema type (#9003)
    
    
    ### Motivation
    
    In PR #7874, Instant, LocalDate, LocalTime, LocalDateTime are added to Pulsar's primitive schemas codes. But doc is not updated accordingly.
    
    ### Modifications
    
    Update the Pulsar docs to support Instant, LocalDate, LocalTime, LocalDateTime for Pulsar's primitive schemas.
    
    - Affected docs: Understand schema
         - sections: primitive type.
    Affected releases: master and 2.7.0
---
 site2/docs/schema-understand.md                                 | 8 ++++++++
 site2/website/versioned_docs/version-2.7.0/schema-understand.md | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/site2/docs/schema-understand.md b/site2/docs/schema-understand.md
index 86bacc9..7d26221 100644
--- a/site2/docs/schema-understand.md
+++ b/site2/docs/schema-understand.md
@@ -143,6 +143,10 @@ Currently, Pulsar supports the following primitive types:
 | `BYTES` | A sequence of 8-bit unsigned bytes |
 | `STRING` | A Unicode character sequence |
 | `TIMESTAMP` (`DATE`, `TIME`) |  A logic type represents a specific instant in time with millisecond precision. <br>It stores the number of milliseconds since `January 1, 1970, 00:00:00 GMT` as an `INT64` value | 
+| INSTANT | A single instantaneous point on the time-line with nanoseconds precision|
+| LOCAL_DATE | An immutable date-time object that represents a date, often viewed as year-month-day|
+| LOCAL_TIME | An immutable date-time object that represents a time, often viewed as hour-minute-second. Time is represented to nanosecond precision.|
+| LOCAL_DATE_TIME | An immutable date-time object that represents a date-time, often viewed as year-month-day-hour-minute-second |
 
 For primitive types, Pulsar does not store any schema data in `SchemaInfo`. The `type` in `SchemaInfo` is used to determine how to serialize and deserialize the data. 
 
@@ -164,6 +168,10 @@ The conversions between **Pulsar schema types** and **language-specific primitiv
 | TIMESTAMP | java.sql.Timestamp | | |
 | TIME | java.sql.Time | | |
 | DATE | java.util.Date | | |
+| INSTANT | java.time.Instant | | |
+| LOCAL_DATE | java.time.LocalDate | | |
+| LOCAL_TIME | java.time.LocalDateTime | |
+| LOCAL_DATE_TIME | java.time.LocalTime | |
 
 **Example**
 
diff --git a/site2/website/versioned_docs/version-2.7.0/schema-understand.md b/site2/website/versioned_docs/version-2.7.0/schema-understand.md
index 051d81a..f81d97e 100644
--- a/site2/website/versioned_docs/version-2.7.0/schema-understand.md
+++ b/site2/website/versioned_docs/version-2.7.0/schema-understand.md
@@ -144,6 +144,10 @@ Currently, Pulsar supports the following primitive types:
 | `BYTES` | A sequence of 8-bit unsigned bytes |
 | `STRING` | A Unicode character sequence |
 | `TIMESTAMP` (`DATE`, `TIME`) |  A logic type represents a specific instant in time with millisecond precision. <br>It stores the number of milliseconds since `January 1, 1970, 00:00:00 GMT` as an `INT64` value | 
+| INSTANT | A single instantaneous point on the time-line with nanoseconds precision|
+| LOCAL_DATE | An immutable date-time object that represents a date, often viewed as year-month-day|
+| LOCAL_TIME | An immutable date-time object that represents a time, often viewed as hour-minute-second. Time is represented to nanosecond precision.|
+| LOCAL_DATE_TIME | An immutable date-time object that represents a date-time, often viewed as year-month-day-hour-minute-second |
 
 For primitive types, Pulsar does not store any schema data in `SchemaInfo`. The `type` in `SchemaInfo` is used to determine how to serialize and deserialize the data. 
 
@@ -165,6 +169,10 @@ The conversions between **Pulsar schema types** and **language-specific primitiv
 | TIMESTAMP | java.sql.Timestamp | | |
 | TIME | java.sql.Time | | |
 | DATE | java.util.Date | | |
+| INSTANT | java.time.Instant | | |
+| LOCAL_DATE | java.time.LocalDate | | |
+| LOCAL_TIME | java.time.LocalDateTime | |
+| LOCAL_DATE_TIME | java.time.LocalTime | |
 
 **Example**