github-actions[bot] commented on code in PR #65782:
URL: https://github.com/apache/doris/pull/65782#discussion_r3610491716
##########
be/src/format/transformer/vorc_transformer.cpp:
##########
@@ -385,8 +385,13 @@ Status
VOrcTransformer::collect_file_statistics_after_close(TIcebergColumnStats*
const iceberg::StructType& root_struct =
_iceberg_schema->root_struct();
const auto& nested_fields = root_struct.fields();
+ const orc::Type& orc_root_type = reader->getType();
for (uint32_t i = 0; i < nested_fields.size(); i++) {
- uint32_t orc_col_id = i + 1; // skip root struct
+ if (i >= orc_root_type.getSubtypeCount()) {
+ continue;
+ }
+ // ORC IDs are depth-first, so top-level fields after a complex
field are not i + 1.
+ uint64_t orc_col_id = orc_root_type.getSubtype(i)->getColumnId();
Review Comment:
[P1] Keep the ORC statistics index in the API's accepted width
This changes `orc_col_id` to `uint64_t`, but the next call passes it to
`orc::Statistics::getColumnStatistics(uint32_t)`. The compile job for this
exact head fails here under Doris's `-Werror,-Wshorten-64-to-32` flags
(`implicit conversion loses integer precision`), so no compile artifact is
produced and both coverage jobs fail downstream. Please perform an explicit,
range-justified conversion (or otherwise keep the value in the API's accepted
width) before the call.
--
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]