From 41058590fda7c58d544c23ab50000285fc56395f Mon Sep 17 00:00:00 2001 From: shilulu1019 Date: Fri, 12 Sep 2025 17:20:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=BA=E7=A8=8B=E4=BB=A3=E7=A0=81=E5=90=88?= =?UTF-8?q?=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../omniop-native-reader/cpp/src/orcfile/OmniColReader.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/omnioperator/omniop-native-reader/cpp/src/orcfile/OmniColReader.cc b/omnioperator/omniop-native-reader/cpp/src/orcfile/OmniColReader.cc index 1948f68be..19382391d 100644 --- a/omnioperator/omniop-native-reader/cpp/src/orcfile/OmniColReader.cc +++ b/omnioperator/omniop-native-reader/cpp/src/orcfile/OmniColReader.cc @@ -621,7 +621,8 @@ namespace omniruntime::reader { char *blob = dictionary->dictionaryBlob.data(); int64_t *dictionaryOffsets = dictionary->dictionaryOffset.data(); auto nullsTrans = reinterpret_cast(nulls); - int64_t outputLengths[numValues]; + std::unique_ptr sp = std::make_unique(numValues); + int64_t *outputLengths = sp.get(); rle->next(outputLengths, numValues, nullsTrans); uint64_t dictionaryCount = dictionary->dictionaryOffset.size() - 1; @@ -685,7 +686,8 @@ namespace omniruntime::reader { // Load data from the blob stream into our buffer until we have enough // to get the rest directly out of the stream's buffer. size_t bytesBuffered = 0; - char ptr[totalLength]; + std::unique_ptr sp =std::make_unique(totalLength); + char *ptr = sp.get(); while (bytesBuffered + lastBufferLength < totalLength) { memcpy_s(ptr + bytesBuffered, totalLength - bytesBuffered, lastBuffer, lastBufferLength); bytesBuffered += lastBufferLength; -- Gitee