Anonymitaet commented on a change in pull request #4767: [Doc] Add *Schema 
Type* Section for Schema Chapter
URL: https://github.com/apache/pulsar/pull/4767#discussion_r305379586
 
 

 ##########
 File path: site2/docs/schema-type.md
 ##########
 @@ -0,0 +1,151 @@
+---
+id: schema-type
+title: Schema type
+sidebar_label: Schema type
+---
+
+Pulsar supports various schema types, which are mainly divided into two 
categories: 
+
+* Primitive type 
+
+* Complex type
+
+> #### Note
+> 
+> If you create a schema without specifying a type, producers and consumers 
can only handle raw bytes.
+
+## Primitive type
+
+Currently, Pulsar supports the following primitive types:
+
+| Primitive Type | Description |
+|---|---|
+| `BOOLEAN` | A binary value |
+| `INT8` | A 8-bit signed integer |
+| `INT16` | A 16-bit signed integer |
+| `INT32` | A 32-bit signed integer |
+| `INT64` | A 64-bit signed integer |
+| `FLOAT` | A single precision (32-bit) IEEE 754 floating-point number |
+| `DOUBLE` | A double-precision (64-bit) IEEE 754 floating-point number |
+| `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. It stores the number of milliseconds since 
`January 1, 1970, 00:00:00 GMT` as an `INT64` value | 
+
+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. 
+
+Some of the primitive schema implementations can use `properties` to store 
implementation-specific tunable settings. For example, a `string` schema can 
use `properties` to store the encoding charset to serialize and deserialize 
strings.
+
+The conversions between **Pulsar schema types** and **language-specific 
primitive types** are as below.
+
+| Schema Type | Java Type| Python Type |
+|---|---|---|
 
 Review comment:
   @sijie Are Python and Go available?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to