zzzxl1993 commented on code in PR #245:
URL: https://github.com/apache/doris-thirdparty/pull/245#discussion_r1827639636
##########
src/core/CLucene/store/v2/GrowableByteArrayDataOutput.h:
##########
@@ -0,0 +1,108 @@
+#pragma once
+
+#include <cstdint>
+#include <string_view>
+#include <vector>
+#include <zstd.h>
+#include <iostream>
+
+#include "CLucene.h"
+#include "CLucene/store/IndexOutput.h"
+
+namespace v2 {
+
+class GrowableByteArrayDataOutput : public CL_NS(store)::IndexOutput {
+public:
+ GrowableByteArrayDataOutput() : bytes_(INITIAL_SIZE) {}
+ ~GrowableByteArrayDataOutput() override = default;
+
+ void writeByte(uint8_t b) override {
+ ensureCapacity(1);
+ bytes_[nextWrite_++] = b;
+ }
+
+ void writeBytes(const uint8_t* b, const int32_t len) override {
writeBytes(b, len, 0); }
+
+ void writeBytes(const uint8_t* b, const int32_t len, const int32_t offset)
override {
Review Comment:
I need to maintain consistency with the clucene IndexOutput interface.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]