eldenmoon commented on code in PR #66204: URL: https://github.com/apache/doris/pull/66204#discussion_r3720733542
########## be/src/storage/segment/variant/v2/variant_shredder.h: ########## @@ -0,0 +1,109 @@ +// 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. + +#pragma once + +#include <cstddef> +#include <cstdint> +#include <memory> +#include <span> + +#include "common/consts.h" +#include "common/status.h" +#include "core/column/column.h" +#include "core/column/variant_v2/column_variant_v2.h" +#include "core/custom_allocator.h" +#include "core/data_type/data_type.h" +#include "storage/segment/variant/v2/variant_path_builder.h" +#include "storage/segment/variant/variant_statistics.h" + +namespace doris { +class TabletSchema; +} + +namespace doris::segment_v2 { + +enum class VariantShredderPhysicalLayout : uint8_t { + ORDINARY, + DOC, +}; + +// Select the smallest result that the physical writer can consume. Parent writers with extracted +// children persist only the root, while an extracted child owns exactly one logical leaf. Keeping +// this decision at writer initialization prevents unused root/path/binary results from being built. +enum class VariantShredderOutputMode : uint8_t { Review Comment: shredder的推荐重构顺序: 1. 先把 extracted-leaf 路径移到 VariantSubcolumnWriter,删除 EXTRACTED_LEAF_ONLY。 2. 再把 root-only 收回 VariantV2ColumnWriter,删除 ROOT_ONLY。 3. 删除 output_mode、logical_root_path 和 append_projected()。 4. 简化 VariantShredder::finish_impl(),只剩 ORDINARY/DOC 分支。 ########## be/src/storage/segment/variant/v2/variant_shredder.h: ########## @@ -0,0 +1,109 @@ +// 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. + +#pragma once + +#include <cstddef> +#include <cstdint> +#include <memory> +#include <span> + +#include "common/consts.h" +#include "common/status.h" +#include "core/column/column.h" +#include "core/column/variant_v2/column_variant_v2.h" +#include "core/custom_allocator.h" +#include "core/data_type/data_type.h" +#include "storage/segment/variant/v2/variant_path_builder.h" +#include "storage/segment/variant/variant_statistics.h" + +namespace doris { +class TabletSchema; +} + +namespace doris::segment_v2 { + +enum class VariantShredderPhysicalLayout : uint8_t { + ORDINARY, + DOC, +}; + +// Select the smallest result that the physical writer can consume. Parent writers with extracted +// children persist only the root, while an extracted child owns exactly one logical leaf. Keeping +// this decision at writer initialization prevents unused root/path/binary results from being built. +enum class VariantShredderOutputMode : uint8_t { Review Comment: 1. 先把 extracted-leaf 路径移到 VariantSubcolumnWriter,删除 EXTRACTED_LEAF_ONLY。 2. 再把 root-only 收回 VariantV2ColumnWriter,删除 ROOT_ONLY。 3. 删除 output_mode、logical_root_path 和 append_projected()。 4. 简化 VariantShredder::finish_impl(),只剩 ORDINARY/DOC 分支。 -- 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]
