shibd commented on code in PR #17125:
URL: https://github.com/apache/pulsar/pull/17125#discussion_r947559204
##########
pulsar-client-cpp/lib/Schema.cc:
##########
@@ -90,6 +117,51 @@ SchemaInfo::SchemaInfo(SchemaType schemaType, const
std::string &name, const std
const StringMap &properties)
: impl_(std::make_shared<SchemaInfoImpl>(schemaType, name, schema,
properties)) {}
+SchemaInfo::SchemaInfo(const SchemaInfo &keySchema, const SchemaInfo
&valueSchema,
+ const KeyValueEncodingType &keyValueEncodingType) {
+ auto checkType = [](const SchemaInfo &schemaInfo) {
+ if (schemaInfo.getSchemaType() != JSON && schemaInfo.getSchemaType()
!= AVRO) {
+ throw std::invalid_argument("Key and value schema just support
JSON or AVRO.");
Review Comment:
Ok, This behavior remains consistent with the java implementation.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]