csun5285 commented on code in PR #42680: URL: https://github.com/apache/doris/pull/42680#discussion_r1823688816
########## gensrc/proto/olap_file.proto: ########## @@ -399,6 +399,7 @@ message TabletSchemaPB { optional bool variant_enable_flatten_nested = 28 [default=false]; optional int32 skip_bitmap_col_idx = 29 [default = -1]; + optional int64 storage_page_size = 30 [default=65536]; Review Comment: `pb_convert.cpp` also needs to add this field. ########## be/src/olap/rowset/segment_v2/vertical_segment_writer.cpp: ########## @@ -250,6 +250,7 @@ Status VerticalSegmentWriter::_create_column_writer(uint32_t cid, const TabletCo #undef CHECK_FIELD_TYPE + opts.data_page_size = _tablet_schema->storage_page_size(); Review Comment: Add a debug point to confirm that the page size is correct. ########## regression-test/suites/query_p0/system/test_storage_page_size.groovy: ########## @@ -0,0 +1,182 @@ +// 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. + +import org.codehaus.groovy.runtime.IOGroovyMethods + +suite ("test_storage_page_size") { + sql """ DROP TABLE IF EXISTS table_1; """ + sql """ + create table table_1 ( + k1 int not null, + k2 int not null, + k3 bigint null, + k4 varchar(100) null + ) + duplicate key (k1) + distributed BY random buckets 1 + properties("replication_num" = "1"); + """ + test { + sql "show create table table_1;" + check { result, exception, startTime, endTime -> + assertFalse(result[0][1].contains("\"storage_page_size\" = \"65536\"")) + } + } Review Comment: add test `alter table table1 set("storage_page_size", "1024")` -- 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