Jay-ju opened a new pull request, #66999:
URL: https://github.com/apache/doris/pull/66999

   ## Summary
   - Answer COUNT(*)/COUNT(1) with no filter from the Lance dataset logical 
(post-deletion) row count instead of scanning any fragment.
   - FE (LanceScanNode): add canPushDownCountStar(), stricter than the LIMIT 
pushdown gate (empty conjuncts AND empty Lance Substrait filter). Emit a single 
whole-dataset split carrying the logical row count; table_level_row_count is 
always set explicitly (-1 for ordinary/search scans), matching the Iceberg 
convention.
   - BE (lance_reader): drop the hardcoded _remaining_table_level_count = -1 
and short-circuit prepare_split()/get_block() when 
_is_table_level_count_active().
   
   ## Tests
   - New test_lance_optimize_count asserts EXPLAIN shows the metadata count 
with no filter and falls back to a normal scan (matching results) with a filter 
or when the switch is off.
   - New multi_frag.lance fixture (3 fragments, one deleted row each: 30 
physical / 27 logical) plus build/self-check; proves the count reports the 
logical total and that a multi-split scan applies each fragment deletion vector 
exactly once. Committed as binary, consistent with existing all_types.lance / 
iceberg preinstalled 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]

Reply via email to