[ 
https://issues.apache.org/jira/browse/KAFKA-19833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lan Ding updated KAFKA-19833:
-----------------------------
    Description: 
 Nullable types (`NULLABLE_STRING`, `NULLABLE_BYTES`, `NULLABLE_RECORDS`, etc.) 
in `Type.java`
 duplicate most of the read/write/sizeOf logic from their non-nullable 
counterparts.

  was:
see [https://github.com/apache/kafka/pull/20614#pullrequestreview-3379156676]

Regarding the implementation of the nullable vs non-nullable types. We use 3 
different approaches.
 # For bytes, we implement two independent classes BYTES and NULLABLE_BYTES.
 # For array, we use one class ArraryOf, which takes a nullable param.
 # For schema, we implement NULLABLE_SCHEMA as a subclass of SCHEMA.

We need  to pick one approach to implement all nullable types in a consistent 
way.


> Reduce code duplication in nullable protocol types
> --------------------------------------------------
>
>                 Key: KAFKA-19833
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19833
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>            Reporter: Lan Ding
>            Assignee: Lan Ding
>            Priority: Major
>
>  Nullable types (`NULLABLE_STRING`, `NULLABLE_BYTES`, `NULLABLE_RECORDS`, 
> etc.) in `Type.java`
>  duplicate most of the read/write/sizeOf logic from their non-nullable 
> counterparts.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to