Repository: ClickHouse/ClickHouse
File: src/Core/YTsaurus/YTsaurusClient.h (C/C++)

Code before:
        String api_version = "v3";
        bool encode_utf8 = false;
        bool enable_heavy_proxy_redirection = true;
    };

    explicit YTsaurusClient(ContextPtr context_, const ConnectionInfo & connection_info_);

    const ConnectionInfo & getConnectionInfo() { return connection_info; }

    ReadBufferPtr readTable(const String & cypress_path, const std::pair<size_t, size_t>& rows_range);

    ReadBufferPtr lookupRows(const String & cypress_path, const Block & lookup_block_input);

    ReadBufferPtr selectRows(const String & cypress_path, const String& column_names_str);

    ReadBufferPtr selectRows(const String & cypress_path, const ColumnsWithTypeAndName& columns);

    YTsaurusNodeType getNodeType(const String & cypress_path);

    String startTx(size_t timeout_ms);

    void commitTx(const String & transaction_id);

    String getNodeIdFromLock(const String & lock_id);

    String lock(const String& cypress_path, const String & transaction_id);

    size_t getTableNumberOfRows(const String& table_path);

    struct SchemaDescription
    {
        bool is_strict;
        std::unordered_map<String, DataTypePtr> columns;
    };

    SchemaDescription getTableSchema(const String & cypress_path);

    bool checkSchemaCompatibility(const String & table_path, const SharedHeader & sample_block, String & reason, bool allow_nullable);
private:
    Poco::JSON::Object::Ptr getNodeMetadata(const String & cypress_path);

    Poco::Dynamic::Var getNodeAttribute(const String & cypress_path, const String & attribute_name);

    YTsaurusNodeType getNodeTypeFromAttributes(const Poco::JSON::Object::Ptr & json_ptr);

    Poco::Dynamic::Var getMetadata(const String & path);


    ReadBufferPtr createQueryRWBuffer(const URI& uri,  const ReadWriteBufferFromHTTP::OutStreamCallback& out_callback, const std::string & http_method);
    ReadBufferPtr executeQuery(YTsaurusQueryPtr query, const ReadWriteBufferFromHTTP::OutStreamCallback && out_callback = nullptr);


Review comment (suggestion):
```suggestion
    String lock(const String & cypress_path, const String & transaction_id);
```

Code after:
        String api_version = "v3";
        bool encode_utf8 = false;
        bool enable_heavy_proxy_redirection = true;
    };

    explicit YTsaurusClient(ContextPtr context_, const ConnectionInfo & connection_info_);

    YTsaurusClient(const YTsaurusClient & other);

    const ConnectionInfo & getConnectionInfo() { return connection_info; }

    ReadBufferPtr readTable(const String & cypress_path, const std::pair<size_t, size_t> & rows_range);

    ReadBufferPtr lookupRows(const String & cypress_path, const Block & lookup_block_input);

    ReadBufferPtr selectRows(const String & cypress_path, const String& column_names_str);

    ReadBufferPtr selectRows(const String & cypress_path, const ColumnsWithTypeAndName& columns);

    YTsaurusNodeType getNodeType(const String & cypress_path);

    String startTx(size_t timeout_ms);

    void commitTx(const String & transaction_id);

    String getNodeIdFromLock(const String & lock_id);

    String lock(const String & cypress_path, const String & transaction_id);

    size_t getTableNumberOfRows(const String& table_path);

    struct SchemaDescription
    {
        bool is_strict;
        std::unordered_map<String, DataTypePtr> columns;
    };

    SchemaDescription getTableSchema(const String & cypress_path);

    bool checkSchemaCompatibility(const String & table_path, const SharedHeader & sample_block, String & reason, bool allow_nullable);
private:
    Poco::JSON::Object::Ptr getNodeMetadata(const String & cypress_path);

    Poco::Dynamic::Var getNodeAttribute(const String & cypress_path, const String & attribute_name);

    YTsaurusNodeType getNodeTypeFromAttributes(const Poco::JSON::Object::Ptr & json_ptr);

    Poco::Dynamic::Var getMetadata(const String & path);


    ReadBufferPtr createQueryRWBuffer(const URI& uri,  const ReadWriteBufferFromHTTP::OutStreamCallback& out_callback, const std::string & http_method);