zclllyybb commented on code in PR #47307: URL: https://github.com/apache/doris/pull/47307#discussion_r1928336564
########## be/src/vec/functions/function_compress.cpp: ########## @@ -0,0 +1,269 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +#include <glog/logging.h> + +#include <cctype> +#include <cstddef> +#include <cstring> +#include <memory> +#include <string> +#include <utility> + +#include "common/status.h" +#include "util/block_compression.h" +#include "util/faststring.h" +#include "vec/aggregate_functions/aggregate_function.h" +#include "vec/columns/column.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/column_vector.h" +#include "vec/columns/columns_number.h" +#include "vec/common/assert_cast.h" +#include "vec/core/block.h" +#include "vec/core/column_numbers.h" +#include "vec/core/column_with_type_and_name.h" +#include "vec/core/types.h" +#include "vec/data_types/data_type.h" +#include "vec/data_types/data_type_nullable.h" +#include "vec/data_types/data_type_number.h" +#include "vec/data_types/data_type_string.h" +#include "vec/functions/function.h" +#include "vec/functions/simple_function_factory.h" + +namespace doris { +class FunctionContext; +} // namespace doris + +namespace doris::vectorized { + +class FunctionCompress : public IFunction { + string hexadecimal = "0123456789ABCDEF"; + +public: + static constexpr auto name = "compress"; + static FunctionPtr create() { return std::make_shared<FunctionCompress>(); } + + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 1; } + + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { + return make_nullable(std::make_shared<DataTypeString>()); + } + + Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, + uint32_t result, size_t input_rows_count) const override { + // Get the compression algorithm object + BlockCompressionCodec* compression_codec; + RETURN_IF_ERROR(get_block_compression_codec(segment_v2::CompressionTypePB::ZLIB, + &compression_codec)); + + const auto& arg_column = + assert_cast<const ColumnString&>(*block.get_by_position(arguments[0]).column); + auto result_column = ColumnString::create(); + + auto& col_data = result_column->get_chars(); + auto& col_offset = result_column->get_offsets(); + col_offset.resize(input_rows_count); + + auto null_column = ColumnUInt8::create(input_rows_count); + auto& null_map = null_column->get_data(); + + faststring compressed_str; + Slice data; + for (size_t row = 0; row < input_rows_count; row++) { + null_map[row] = false; + const auto& str = arg_column.get_data_at(row); + data = Slice(str.data, str.size); + + auto st = compression_codec->compress(data, &compressed_str); Review Comment: when will compress fail? ########## be/src/vec/functions/function_compress.cpp: ########## @@ -0,0 +1,269 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +#include <glog/logging.h> + +#include <cctype> +#include <cstddef> +#include <cstring> +#include <memory> +#include <string> +#include <utility> + +#include "common/status.h" +#include "util/block_compression.h" +#include "util/faststring.h" +#include "vec/aggregate_functions/aggregate_function.h" +#include "vec/columns/column.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/column_vector.h" +#include "vec/columns/columns_number.h" +#include "vec/common/assert_cast.h" +#include "vec/core/block.h" +#include "vec/core/column_numbers.h" +#include "vec/core/column_with_type_and_name.h" +#include "vec/core/types.h" +#include "vec/data_types/data_type.h" +#include "vec/data_types/data_type_nullable.h" +#include "vec/data_types/data_type_number.h" +#include "vec/data_types/data_type_string.h" +#include "vec/functions/function.h" +#include "vec/functions/simple_function_factory.h" + +namespace doris { +class FunctionContext; +} // namespace doris + +namespace doris::vectorized { + +class FunctionCompress : public IFunction { + string hexadecimal = "0123456789ABCDEF"; + +public: + static constexpr auto name = "compress"; + static FunctionPtr create() { return std::make_shared<FunctionCompress>(); } + + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 1; } + + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { + return make_nullable(std::make_shared<DataTypeString>()); + } + + Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, + uint32_t result, size_t input_rows_count) const override { + // Get the compression algorithm object + BlockCompressionCodec* compression_codec; + RETURN_IF_ERROR(get_block_compression_codec(segment_v2::CompressionTypePB::ZLIB, + &compression_codec)); + + const auto& arg_column = + assert_cast<const ColumnString&>(*block.get_by_position(arguments[0]).column); + auto result_column = ColumnString::create(); + + auto& col_data = result_column->get_chars(); + auto& col_offset = result_column->get_offsets(); + col_offset.resize(input_rows_count); + + auto null_column = ColumnUInt8::create(input_rows_count); + auto& null_map = null_column->get_data(); + + faststring compressed_str; + Slice data; + for (size_t row = 0; row < input_rows_count; row++) { + null_map[row] = false; + const auto& str = arg_column.get_data_at(row); + data = Slice(str.data, str.size); + + auto st = compression_codec->compress(data, &compressed_str); + + if (!st.ok()) { // Failed to decompress. data is an illegal value + col_offset[row] = col_offset[row - 1]; + null_map[row] = true; + continue; + } + + size_t idx = col_data.size(); + if (!str.size) { // data is '' + col_data.resize(col_data.size() + 2); + col_data[idx] = '0', col_data[idx + 1] = 'x'; + col_offset[row] = col_offset[row - 1] + 2; + continue; + } + + // first ten digits represent the length of the uncompressed string + int value = (int)str.size; + col_data.resize(col_data.size() + 10); + col_data[idx] = '0', col_data[idx + 1] = 'x'; + for (size_t i = 0; i < 4; i++) { + unsigned char byte = (value >> (i * 8)) & 0xFF; + col_data[idx + 2 + i * 2] = hexadecimal[byte >> 4]; // higher four + col_data[idx + 3 + i * 2] = hexadecimal[byte & 0x0F]; + } + idx += 10; + + col_data.resize(col_data.size() + 2 * compressed_str.size()); + + unsigned char* src = compressed_str.data(); + { + for (size_t i = 0; i < compressed_str.size(); i++) { + col_data[idx] = + ((*src >> 4) & 0x0F) + (((*src >> 4) & 0x0F) < 10 ? '0' : 'A' - 10); + col_data[idx + 1] = (*src & 0x0F) + ((*src & 0x0F) < 10 ? '0' : 'A' - 10); + idx += 2; + src++; + } + + col_offset[row] = col_offset[row - 1] + 10 + compressed_str.size() * 2; + } + } + + block.replace_by_position( + result, ColumnNullable::create(std::move(result_column), std::move(null_column))); + return Status::OK(); + } +}; + +class FunctionUncompress : public IFunction { + string hexadecimal = "0123456789ABCDEF"; + +public: + static constexpr auto name = "uncompress"; + static FunctionPtr create() { return std::make_shared<FunctionUncompress>(); } + + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 1; } + + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { + return make_nullable(std::make_shared<DataTypeString>()); + } + + Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, + uint32_t result, size_t input_rows_count) const override { + // Get the compression algorithm object + BlockCompressionCodec* compression_codec; + RETURN_IF_ERROR(get_block_compression_codec(segment_v2::CompressionTypePB::ZLIB, + &compression_codec)); + + const auto& arg_column = + assert_cast<const ColumnString&>(*block.get_by_position(arguments[0]).column); + + auto result_column = ColumnString::create(); + auto& col_data = result_column->get_chars(); + auto& col_offset = result_column->get_offsets(); + col_offset.resize(input_rows_count); + + auto null_column = ColumnUInt8::create(input_rows_count); + auto& null_map = null_column->get_data(); + + std::string uncompressed; + Slice data; + Slice uncompressed_slice; + for (size_t row = 0; row < input_rows_count; row++) { + auto check = [](char x) { Review Comment: try to use std function firstly ########## be/src/vec/functions/function_compress.cpp: ########## @@ -0,0 +1,269 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +#include <glog/logging.h> + +#include <cctype> +#include <cstddef> +#include <cstring> +#include <memory> +#include <string> +#include <utility> + +#include "common/status.h" +#include "util/block_compression.h" +#include "util/faststring.h" +#include "vec/aggregate_functions/aggregate_function.h" +#include "vec/columns/column.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/column_vector.h" +#include "vec/columns/columns_number.h" +#include "vec/common/assert_cast.h" +#include "vec/core/block.h" +#include "vec/core/column_numbers.h" +#include "vec/core/column_with_type_and_name.h" +#include "vec/core/types.h" +#include "vec/data_types/data_type.h" +#include "vec/data_types/data_type_nullable.h" +#include "vec/data_types/data_type_number.h" +#include "vec/data_types/data_type_string.h" +#include "vec/functions/function.h" +#include "vec/functions/simple_function_factory.h" + +namespace doris { +class FunctionContext; +} // namespace doris + +namespace doris::vectorized { + +class FunctionCompress : public IFunction { + string hexadecimal = "0123456789ABCDEF"; + +public: + static constexpr auto name = "compress"; + static FunctionPtr create() { return std::make_shared<FunctionCompress>(); } + + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 1; } + + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { + return make_nullable(std::make_shared<DataTypeString>()); + } + + Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, + uint32_t result, size_t input_rows_count) const override { + // Get the compression algorithm object + BlockCompressionCodec* compression_codec; + RETURN_IF_ERROR(get_block_compression_codec(segment_v2::CompressionTypePB::ZLIB, + &compression_codec)); + + const auto& arg_column = + assert_cast<const ColumnString&>(*block.get_by_position(arguments[0]).column); + auto result_column = ColumnString::create(); + + auto& col_data = result_column->get_chars(); + auto& col_offset = result_column->get_offsets(); + col_offset.resize(input_rows_count); + + auto null_column = ColumnUInt8::create(input_rows_count); + auto& null_map = null_column->get_data(); + + faststring compressed_str; + Slice data; + for (size_t row = 0; row < input_rows_count; row++) { + null_map[row] = false; + const auto& str = arg_column.get_data_at(row); + data = Slice(str.data, str.size); + + auto st = compression_codec->compress(data, &compressed_str); + + if (!st.ok()) { // Failed to decompress. data is an illegal value + col_offset[row] = col_offset[row - 1]; + null_map[row] = true; + continue; + } + + size_t idx = col_data.size(); + if (!str.size) { // data is '' + col_data.resize(col_data.size() + 2); + col_data[idx] = '0', col_data[idx + 1] = 'x'; + col_offset[row] = col_offset[row - 1] + 2; + continue; + } + + // first ten digits represent the length of the uncompressed string + int value = (int)str.size; + col_data.resize(col_data.size() + 10); + col_data[idx] = '0', col_data[idx + 1] = 'x'; + for (size_t i = 0; i < 4; i++) { + unsigned char byte = (value >> (i * 8)) & 0xFF; + col_data[idx + 2 + i * 2] = hexadecimal[byte >> 4]; // higher four + col_data[idx + 3 + i * 2] = hexadecimal[byte & 0x0F]; + } + idx += 10; + + col_data.resize(col_data.size() + 2 * compressed_str.size()); + + unsigned char* src = compressed_str.data(); + { + for (size_t i = 0; i < compressed_str.size(); i++) { + col_data[idx] = Review Comment: so tricky here. try to improve code like it ########## be/src/vec/functions/function_compress.cpp: ########## @@ -0,0 +1,269 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +#include <glog/logging.h> + +#include <cctype> +#include <cstddef> +#include <cstring> +#include <memory> +#include <string> +#include <utility> + +#include "common/status.h" +#include "util/block_compression.h" +#include "util/faststring.h" +#include "vec/aggregate_functions/aggregate_function.h" +#include "vec/columns/column.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/column_vector.h" +#include "vec/columns/columns_number.h" +#include "vec/common/assert_cast.h" +#include "vec/core/block.h" +#include "vec/core/column_numbers.h" +#include "vec/core/column_with_type_and_name.h" +#include "vec/core/types.h" +#include "vec/data_types/data_type.h" +#include "vec/data_types/data_type_nullable.h" +#include "vec/data_types/data_type_number.h" +#include "vec/data_types/data_type_string.h" +#include "vec/functions/function.h" +#include "vec/functions/simple_function_factory.h" + +namespace doris { +class FunctionContext; +} // namespace doris + +namespace doris::vectorized { + +class FunctionCompress : public IFunction { + string hexadecimal = "0123456789ABCDEF"; + +public: + static constexpr auto name = "compress"; + static FunctionPtr create() { return std::make_shared<FunctionCompress>(); } + + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 1; } + + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { + return make_nullable(std::make_shared<DataTypeString>()); + } + + Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, + uint32_t result, size_t input_rows_count) const override { + // Get the compression algorithm object + BlockCompressionCodec* compression_codec; + RETURN_IF_ERROR(get_block_compression_codec(segment_v2::CompressionTypePB::ZLIB, + &compression_codec)); + + const auto& arg_column = + assert_cast<const ColumnString&>(*block.get_by_position(arguments[0]).column); + auto result_column = ColumnString::create(); + + auto& col_data = result_column->get_chars(); + auto& col_offset = result_column->get_offsets(); + col_offset.resize(input_rows_count); + + auto null_column = ColumnUInt8::create(input_rows_count); + auto& null_map = null_column->get_data(); + + faststring compressed_str; + Slice data; + for (size_t row = 0; row < input_rows_count; row++) { + null_map[row] = false; + const auto& str = arg_column.get_data_at(row); Review Comment: no need to use virtual function here ########## regression-test/data/query_p0/sql_functions/string_functions/test_compress_uncompress.out: ########## @@ -0,0 +1,37 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !nullable -- +1 \N +2 \N +3 \N +4 \N +5 \N +6 \N + +-- !not_nullable -- +1 0x0D000000789CF348CDC9C9D75128CF2FCA49510400205E048A +2 0x17000000789C011700E8FF446F726973E6B58BE8AF95E4B8ADE69687E5AD97E7ACA6A70F0F02 +3 \N +4 0x +5 \N +6 0x32000000789C4B4C24150000E35C12F3 + +-- !nullable_no_null -- +1 0x0D000000789CF348CDC9C9D75128CF2FCA49510400205E048A +2 0x17000000789C011700E8FF446F726973E6B58BE8AF95E4B8ADE69687E5AD97E7ACA6A70F0F02 +3 \N +4 0x +5 \N +6 0x32000000789C4B4C24150000E35C12F3 + +-- !const_nullable -- +\N \N + +-- !const_not_nullable -- +0x05000000789C73C92FCA2C060005B00202 0x446F726973 Review Comment: carefully review your result!!! ########## be/src/vec/functions/function_compress.cpp: ########## @@ -0,0 +1,269 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +#include <glog/logging.h> + +#include <cctype> +#include <cstddef> +#include <cstring> +#include <memory> +#include <string> +#include <utility> + +#include "common/status.h" +#include "util/block_compression.h" +#include "util/faststring.h" +#include "vec/aggregate_functions/aggregate_function.h" +#include "vec/columns/column.h" +#include "vec/columns/column_nullable.h" +#include "vec/columns/column_string.h" +#include "vec/columns/column_vector.h" +#include "vec/columns/columns_number.h" +#include "vec/common/assert_cast.h" +#include "vec/core/block.h" +#include "vec/core/column_numbers.h" +#include "vec/core/column_with_type_and_name.h" +#include "vec/core/types.h" +#include "vec/data_types/data_type.h" +#include "vec/data_types/data_type_nullable.h" +#include "vec/data_types/data_type_number.h" +#include "vec/data_types/data_type_string.h" +#include "vec/functions/function.h" +#include "vec/functions/simple_function_factory.h" + +namespace doris { +class FunctionContext; +} // namespace doris + +namespace doris::vectorized { + +class FunctionCompress : public IFunction { + string hexadecimal = "0123456789ABCDEF"; + +public: + static constexpr auto name = "compress"; + static FunctionPtr create() { return std::make_shared<FunctionCompress>(); } + + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 1; } + + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { + return make_nullable(std::make_shared<DataTypeString>()); + } + + Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, + uint32_t result, size_t input_rows_count) const override { + // Get the compression algorithm object + BlockCompressionCodec* compression_codec; + RETURN_IF_ERROR(get_block_compression_codec(segment_v2::CompressionTypePB::ZLIB, + &compression_codec)); + + const auto& arg_column = + assert_cast<const ColumnString&>(*block.get_by_position(arguments[0]).column); + auto result_column = ColumnString::create(); + + auto& col_data = result_column->get_chars(); + auto& col_offset = result_column->get_offsets(); + col_offset.resize(input_rows_count); + + auto null_column = ColumnUInt8::create(input_rows_count); + auto& null_map = null_column->get_data(); + + faststring compressed_str; + Slice data; + for (size_t row = 0; row < input_rows_count; row++) { + null_map[row] = false; + const auto& str = arg_column.get_data_at(row); + data = Slice(str.data, str.size); + + auto st = compression_codec->compress(data, &compressed_str); + + if (!st.ok()) { // Failed to decompress. data is an illegal value + col_offset[row] = col_offset[row - 1]; + null_map[row] = true; + continue; + } + + size_t idx = col_data.size(); + if (!str.size) { // data is '' + col_data.resize(col_data.size() + 2); + col_data[idx] = '0', col_data[idx + 1] = 'x'; + col_offset[row] = col_offset[row - 1] + 2; + continue; + } + + // first ten digits represent the length of the uncompressed string + int value = (int)str.size; + col_data.resize(col_data.size() + 10); + col_data[idx] = '0', col_data[idx + 1] = 'x'; + for (size_t i = 0; i < 4; i++) { + unsigned char byte = (value >> (i * 8)) & 0xFF; + col_data[idx + 2 + i * 2] = hexadecimal[byte >> 4]; // higher four + col_data[idx + 3 + i * 2] = hexadecimal[byte & 0x0F]; + } + idx += 10; + + col_data.resize(col_data.size() + 2 * compressed_str.size()); + + unsigned char* src = compressed_str.data(); + { + for (size_t i = 0; i < compressed_str.size(); i++) { + col_data[idx] = + ((*src >> 4) & 0x0F) + (((*src >> 4) & 0x0F) < 10 ? '0' : 'A' - 10); + col_data[idx + 1] = (*src & 0x0F) + ((*src & 0x0F) < 10 ? '0' : 'A' - 10); + idx += 2; + src++; + } + + col_offset[row] = col_offset[row - 1] + 10 + compressed_str.size() * 2; + } + } + + block.replace_by_position( + result, ColumnNullable::create(std::move(result_column), std::move(null_column))); + return Status::OK(); + } +}; + +class FunctionUncompress : public IFunction { + string hexadecimal = "0123456789ABCDEF"; + +public: + static constexpr auto name = "uncompress"; + static FunctionPtr create() { return std::make_shared<FunctionUncompress>(); } + + String get_name() const override { return name; } + + size_t get_number_of_arguments() const override { return 1; } + + DataTypePtr get_return_type_impl(const DataTypes& arguments) const override { + return make_nullable(std::make_shared<DataTypeString>()); + } + + Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments, + uint32_t result, size_t input_rows_count) const override { + // Get the compression algorithm object + BlockCompressionCodec* compression_codec; + RETURN_IF_ERROR(get_block_compression_codec(segment_v2::CompressionTypePB::ZLIB, + &compression_codec)); + + const auto& arg_column = + assert_cast<const ColumnString&>(*block.get_by_position(arguments[0]).column); + + auto result_column = ColumnString::create(); + auto& col_data = result_column->get_chars(); + auto& col_offset = result_column->get_offsets(); + col_offset.resize(input_rows_count); + + auto null_column = ColumnUInt8::create(input_rows_count); + auto& null_map = null_column->get_data(); + + std::string uncompressed; + Slice data; + Slice uncompressed_slice; + for (size_t row = 0; row < input_rows_count; row++) { + auto check = [](char x) { + return ((x >= '0' && x <= '9') || (x >= 'a' && x <= 'f') || (x >= 'A' && x <= 'F')); + }; + + null_map[row] = false; + const auto& str = arg_column.get_data_at(row); + data = Slice(str.data, str.size); + + int illegal = 0; Review Comment: why not bool? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org