You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/10/01 04:59:05 UTC

[GitHub] [pulsar] BewareMyPower commented on pull request #8173: [WIP] [Issue 8154] [Python client] Expose schema version (of writerSchema) in Message

BewareMyPower commented on pull request #8173:
URL: https://github.com/apache/pulsar/pull/8173#issuecomment-701884570


   The cpp tests failed because your code was not well formatted. You should use `clang-format-5.0` to format code.
   
   Also you could `git apply` following diff:
   
   ```diff
   diff --git a/pulsar-client-cpp/include/pulsar/c/message.h b/pulsar-client-cpp/include/pulsar/c/message.h
   index 8b4b612..f54d025 100644
   --- a/pulsar-client-cpp/include/pulsar/c/message.h
   +++ b/pulsar-client-cpp/include/pulsar/c/message.h
   @@ -202,7 +202,7 @@ PULSAR_PUBLIC int pulsar_message_get_redelivery_count(pulsar_message_t *message)
    
    PULSAR_PUBLIC int pulsar_message_has_schema_version(pulsar_message_t *message);
    
   -PULSAR_PUBLIC const char* pulsar_message_get_schemaVersion(pulsar_message_t *message);
   +PULSAR_PUBLIC const char *pulsar_message_get_schemaVersion(pulsar_message_t *message);
    
    PULSAR_PUBLIC void pulsar_message_set_schema_version(pulsar_message_t *message, const char *schemaVersion);
    
   diff --git a/pulsar-client-cpp/lib/MessageImpl.cc b/pulsar-client-cpp/lib/MessageImpl.cc
   index 8acb959..5d1edbf 100644
   --- a/pulsar-client-cpp/lib/MessageImpl.cc
   +++ b/pulsar-client-cpp/lib/MessageImpl.cc
   @@ -98,7 +98,7 @@ void MessageImpl::setRedeliveryCount(int count) { redeliveryCount_ = count; }
    
    bool MessageImpl::hasSchemaVersion() const { return metadata.has_schema_version(); }
    
   -void MessageImpl::setSchemaVersion(const std::string& schemaVersion) { schemaVersion_ =  &schemaVersion; }
   +void MessageImpl::setSchemaVersion(const std::string& schemaVersion) { schemaVersion_ = &schemaVersion; }
    
    const std::string& MessageImpl::getSchemaVersion() const { return metadata.schema_version(); }
    
   ```


----------------------------------------------------------------
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:
users@infra.apache.org