yiguolei commented on code in PR #62648:
URL: https://github.com/apache/doris/pull/62648#discussion_r3114418946
##########
be/src/storage/segment/column_reader.cpp:
##########
@@ -2564,4 +2567,131 @@ Status RowIdColumnIteratorV2::read_by_rowids(const
rowid_t* rowids, const size_t
return Status::OK();
}
+// Helper: unwrap ColumnNullable if present, return the inner column.
+// Sets *is_nullable = true if the outer column is nullable (if is_nullable is
not null).
+static const IColumn& unwrap_nullable(const IColumn& col, bool* is_nullable) {
+ if (const auto* nullable = check_and_get_column<ColumnNullable>(col)) {
+ if (is_nullable) {
+ *is_nullable = true;
+ }
+ return nullable->get_nested_column();
+ }
+ if (is_nullable) {
+ *is_nullable = false;
+ }
+ return col;
+}
+
+Status FileColumnIterator::check_column_type(const IColumn& dst) const {
+ bool is_nullable = false;
+ const auto& inner = unwrap_nullable(dst, &is_nullable);
+
+ // Check 1: canonical column type from storage data type
+ auto canonical_col = _reader->get_vec_data_type()->create_column();
Review Comment:
这个vec data type 就是column meta data 里的,这个验证是什么作用
--
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]