XiaoHongbo-Hope commented on PR #578:
URL: https://github.com/apache/paimon-rust/pull/578#issuecomment-5043536955

   > Blocking: malformed global-index metadata is currently treated as an 
unavailable optimization and silently falls back to a normal table scan.
   > 
   > `BTreeIndexMeta::deserialize(bytes).ok()` discards the `InvalidData` 
error, and `evaluate_leaf` later returns `Ok(None)` when any shard has 
unavailable metadata. This makes a corrupted or incomplete declared 
BTree/Bitmap index indistinguishable from an unsupported predicate or an absent 
index. It also hides storage corruption and may unexpectedly turn an indexed 
query into a full scan without any warning.
   > 
   > The bounds checks added to `BTreeIndexMeta::deserialize` are correct: 
malformed external data must return a structured error instead of panicking. 
However, that error should be propagated as `Error::DataInvalid`, consistent 
with failures while opening or querying the physical index file.
   > 
   > Please consider changing `GlobalIndexScanner::create` to return 
`Result<Option<Self>>`, reserving `Ok(None)` for cases where no applicable 
index exists or the predicate cannot be evaluated. Missing required metadata 
and deserialization failures for a declared sorted index should return `Err`. 
The regression tests should assert an error rather than a successful fallback.
   
   Fixed


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

Reply via email to