airborne12 commented on code in PR #245: URL: https://github.com/apache/doris-thirdparty/pull/245#discussion_r1822156436
########## cmake/FindZstd.cmake: ########## @@ -0,0 +1,68 @@ +# FindZstd.cmake +# Try to find or build the zstd library + +if(NOT TARGET zstd) + message(STATUS "Zstd target not found, checking for local sources...") + + # Set up paths for Zstd + set(ZSTD_VERSION "1.5.5") + set(ZSTD_URL "https://github.com/facebook/zstd/releases/download/v${ZSTD_VERSION}/zstd-${ZSTD_VERSION}.tar.gz") Review Comment: put zstd to src/ext directory ########## src/core/CLucene/index/TermInfosWriter.cpp: ########## @@ -85,6 +87,16 @@ void STermInfosWriter<T>::add(STerm<T> *term, TermInfo *ti) { add(fieldInfos->fieldNumber(term->field()), termTextBuffer.values, length, ti); } +template <typename T> +void STermInfosWriter<T>::add(const TCHAR* field, const T* text, size_t length, TermInfo* ti) { + if (termTextBuffer.values == nullptr || termTextBuffer.length < length) { + termTextBuffer.resize((int32_t)(length * 1.25)); Review Comment: Why we set 1.25? ########## src/core/CLucene/index/IndexWriter.cpp: ########## @@ -1383,7 +1388,7 @@ void IndexWriter::indexCompaction(std::vector<lucene::store::Directory *> &src_d proxOutputList.push_back(proxOut); // Instantiate a new termInfosWriter which will write in directory // for the segment name segment using the new merged fieldInfos - TermInfosWriter *termInfosWriter = _CLNEW TermInfosWriter(dest_dir, segment.c_str(), fieldInfos, termIndexInterval); + auto* termInfosWriter = _CLNEW STermInfosWriter<char>(dest_dir, segment.c_str(), fieldInfos, termIndexInterval); Review Comment: Why we change STermInfosWriter here? -- 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: dev-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For additional commands, e-mail: dev-h...@doris.apache.org