XiaoHongbo-Hope commented on code in PR #672:
URL: https://github.com/apache/paimon-rust/pull/672#discussion_r3713695831


##########
crates/paimon/src/table/read_builder.rs:
##########
@@ -56,6 +60,15 @@ fn is_exact_filter_pushdown_for_schema(
     let (_, data_predicates) =
         split_partition_and_data_predicates(filter.clone(), fields, 
partition_keys);
     data_predicates.is_empty()
+        || data_predicates.iter().all(|predicate| {
+            matches!(
+                predicate,
+                Predicate::Leaf {
+                    op: PredicateOperator::Eq | PredicateOperator::Like,

Review Comment:
   Fixed in b33774b. Exact Eq/LIKE data leaves are now classified for 
unpartitioned tables as well; the empty-partition-key short-circuit was 
removed. Added a self-contained DataFusion physical-plan regression that 
creates an unpartitioned Paimon table, verifies `PaimonTableScan` receives 
`limit=1`, and checks the query result.



##########
crates/paimon/src/table/table_scan.rs:
##########
@@ -928,6 +928,38 @@ struct PaimonTableScan<'a> {
     projected_read_field_ids: Option<HashSet<i32>>,
 }
 
+fn safe_global_index_limit(
+    limit: Option<usize>,
+    data_predicates: &[Predicate],
+    has_primary_keys: bool,
+    deletion_vectors_enabled: bool,
+    has_partition_filter: bool,
+    has_bucket_predicate: bool,
+) -> Option<usize> {
+    // Early-stop is valid only when every index row id is an exact match.
+    // In particular, bitmap floating-point range queries deliberately return
+    // all non-null rows as residual candidates, so they must see every shard.
+    // Multiple leaves are also unsafe because limiting either side before an
+    // intersection can under-fill the final result.
+    let exact_single_predicate = matches!(
+        data_predicates,
+        [Predicate::Leaf {
+            op: PredicateOperator::Eq | PredicateOperator::Like,

Review Comment:
   Fixed in b33774b. Limited planning now declines Float/Double equality 
early-stop whenever any selected global-index shard uses Bitmap, so execution 
falls back to the normal scan instead of truncating canonicalized NaN 
candidates. Extended the Float/Double multi-payload NaN regressions (negative, 
positive, and canonical payloads) with `LIMIT 1` to verify the scanner returns 
unsupported for early-stop.



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