Huanli-Meng commented on a change in pull request #8278:
URL: https://github.com/apache/pulsar/pull/8278#discussion_r506446652



##########
File path: site2/docs/functions-develop.md
##########
@@ -104,22 +104,14 @@ For complete code, see 
[here](https://github.com/apache/pulsar/blob/master/pulsa
 <!--END_DOCUSAURUS_CODE_TABS-->
 
 ## Schema registry
-Pulsar has a built in schema registry and comes bundled with a variety of 
popular schema types(avro, json and protobuf). Pulsar Functions can leverage 
existing schema information from input topics and derive the input type. The 
schema registry applies for output topic as well.
+Pulsar has a built-in schema registry and is bundled with popular schema 
types, such as avro, json and protobuf. Pulsar Functions can leverage the 
existing schema information from input topics and derive the input type. The 
schema registry applies for output topic as well.

Review comment:
       ```suggestion
   Pulsar has a built-in schema registry and is bundled with popular schema 
types, such as Avro, JSON and Protobuf. Pulsar Functions can leverage the 
existing schema information from input topics and derive the input type. The 
schema registry applies for output topic as well.
   ```

##########
File path: site2/docs/functions-develop.md
##########
@@ -129,6 +121,12 @@ public interface SerDe<T> {
     byte[] serialize(T input);
 }
 ```
+SerDe works in the following way in Java Functions.

Review comment:
       ```suggestion
   SerDe works in the following ways in Java Functions.
   ```

##########
File path: site2/docs/functions-develop.md
##########
@@ -129,6 +121,12 @@ public interface SerDe<T> {
     byte[] serialize(T input);
 }
 ```
+SerDe works in the following way in Java Functions.
+- If the input and output topics have schema, Pulsar Functions use schema for 
SerDe.
+- If the input and output topics do not exist, Pulsar Functions adopt the 
following rules to determine SerDe:
+  - If the schema type is specified, Pulsar Functions use the specified schema 
type.
+  - If SerDe is specified, Pulsar Functions use the specified SerDe, and the 
schema type for input and output topics is `Byte`.
+  - If either the schema type nor SerDe is specified, Pulsar Functions use the 
built-in SerDe. For non-primitive schema type, the built-in SerDe serializes 
and deserializes objects in the `json` format. 

Review comment:
       either...or, neither...nor, Please double confirm which one you should 
use.

##########
File path: site2/docs/functions-develop.md
##########
@@ -129,6 +121,12 @@ public interface SerDe<T> {
     byte[] serialize(T input);
 }
 ```
+SerDe works in the following way in Java Functions.
+- If the input and output topics have schema, Pulsar Functions use schema for 
SerDe.
+- If the input and output topics do not exist, Pulsar Functions adopt the 
following rules to determine SerDe:

Review comment:
       If there is no input and output topics, what the schema is used for? Do 
you mean that the input and output topics do not specify the schema?




----------------------------------------------------------------
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]


Reply via email to