github-actions[bot] commented on code in PR #67784:
URL: https://github.com/apache/doris/pull/67784#discussion_r4024078116


##########
be/src/format_v2/table/paimon_reader.cpp:
##########
@@ -179,6 +180,47 @@ Status annotate_paimon_variants(const 
std::vector<ColumnDefinition>& table_schem
     return Status::OK();
 }
 
+DataTypePtr nullable_like_original(const DataTypePtr& original, DataTypePtr 
nested) {
+    return original != nullptr && original->is_nullable() ? 
make_nullable(nested) : nested;
+}
+
+DataTypePtr apply_paimon_timestamp_semantics(format::ColumnDefinition* column) 
{
+    DORIS_CHECK(column != nullptr);
+    DORIS_CHECK(column->type != nullptr);
+    const auto primitive = remove_nullable(column->type)->get_primitive_type();
+    if (column->timestamp_is_adjusted_to_utc.has_value() &&
+        (primitive == TYPE_DATETIMEV2 || primitive == TYPE_TIMESTAMPTZ)) {
+        const auto target =

Review Comment:
   [P1] Isolate cached predicates across Paimon timestamp evolution
   
   This history override is not represented in the condition-cache key. Paimon 
permits an in-place TIMESTAMP -> TIMESTAMP_LTZ type change while retaining the 
field ID, so an old INT96 file can be scanned before and after the ALTER with 
the same path/range and original predicate digest; after the ALTER, 
`ColumnMapper` additionally casts the historical DATETIMEV2 value to the 
current TIMESTAMPTZ type. For example, under a non-UTC session `CAST(ts AS 
STRING) = ...` can change truth, but `VSlotRef` hashes only the unchanged field 
ID/name and `VCastExpr` hashes only the STRING target, so an all-false bitmap 
from the old schema can skip matching rows under the new one. Please include 
the relevant Paimon file/current timestamp semantics in the cache identity, or 
disable condition-cache reuse when history requires this cast.



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