github-actions[bot] commented on code in PR #64854:
URL: https://github.com/apache/doris/pull/64854#discussion_r3503849625
##########
be/src/core/data_type_serde/data_type_string_serde.cpp:
##########
@@ -330,6 +332,16 @@ Status
DataTypeStringSerDeBase<ColumnType>::write_column_to_orc(
return Status::OK();
}
+template <typename ColumnType>
+Status DataTypeStringSerDeBase<ColumnType>::read_column_from_orc(
+ const std::string& timezone, IColumn& column, const orc::Type*
orc_type,
+ const orc::ColumnVectorBatch* orc_col_batch, int64_t start, int64_t
end,
+ const UInt8* filter) const {
+ const bool is_orc_char = orc_type != nullptr && orc_type->getKind() ==
orc::TypeKind::CHAR;
+ return orc_serde::read_string_column(column, orc_col_batch, start, end,
Review Comment:
This changes STRING/VARCHAR reads into CHAR slots. For string-family schema
changes the ORC reader uses a `ConsistentConverter`, so an ORC
`STRING`/`VARCHAR` source read into a Doris `CHAR` slot reaches this serde with
`_type == TYPE_CHAR` even though `orc_type->getKind()` is not `CHAR`. The new
`_type == TYPE_CHAR || is_orc_char` condition then calls `trim_right()` in
`read_string_column()`, whereas the old reader only trimmed when the ORC
physical type itself was `CHAR`. A file value like `abc ` stored as ORC STRING
therefore becomes `abc` after this refactor. Please base this trim on the ORC
kind (`is_orc_char`) only, or add an explicit conversion/test if changing
STRING/VARCHAR-to-CHAR semantics is intended.
--
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]