bobhan1 commented on PR #63622:
URL: https://github.com/apache/doris/pull/63622#issuecomment-4560513511

   Found one correctness issue in the variant writer path:
   
   `prepare_materialized_subcolumn_writer()` creates a fresh 
`ColumnWriterOptions opts` and copies `meta`, `index_file_writer`, 
`compression_type`, `rowset_ctx`, and `file_writer`, but it does not copy 
`base_opts.storage_format`. Since `_init_column_meta()` now resolves the 
physical encoding from `opts.storage_format`, this path falls back to the 
`ColumnWriterOptions` default (`TABLET_STORAGE_FORMAT_V2`) even when the owning 
tablet is V3.
   
   This is different from `prepare_subcolumn_writer_target()`, which now 
correctly does `opts.storage_format = base_opts.storage_format`. For V3 variant 
doc materialized subcolumns created via 
`VariantDocWriter::_write_materialized_subcolumn()` / 
`VariantDocCompactWriter::_write_materialized_subcolumn()`, the missing 
assignment can write V2 default encodings and defeat the new storage-format 
based policy.
   
   Please propagate `opts.storage_format = base_opts.storage_format` in 
`prepare_materialized_subcolumn_writer()` as well, and consider adding a V3 
doc-mode materialized subcolumn test.


-- 
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]

Reply via email to