hulincup commented on PR #66416:
URL: https://github.com/apache/doris/pull/66416#issuecomment-5175109289

   Thanks for the checklist. Describing this PR per the points (the PR 
description above covers these in detail; summarizing here):
   
   **1. Problem fixed & how**
   Issue #66030: a short-circuit point query on a table with `PARTITION BY 
LIST` and more than one tablet per partition threw `IllegalStateException` 
(msg: null) at `PointQueryExecutor.setScanRangeLocations` (single-tablet 
`checkState`).
   Root cause: in `OlapScanNode.computeTabletInfo`, point queries forced the 
legacy `HashDistributionPruner` path (`isNereids && !isPointQuery`), which 
prunes via `columnFilters`. For a nereids direct point query those column 
filters are not populated, so the pruner returned all tablets of the matched 
partition → the single-tablet check failed. Fixed by using the nereids-pruned 
tablet set when it has already been pruned to one tablet.
   
   **2. Behavior modified (previous vs. now, impact)**
   - *Previous:* direct point query → legacy path with empty `columnFilters` → 
all tablets → crash. Prepared point query → legacy runtime prune (works).
   - *Now:* direct point query (nereids pruned to 1 tablet) → nereids path → 1 
tablet → fixed. Prepared point query (multiple tablets, value unknown at 
planning) → legacy runtime prune, unchanged. Non-point / non-nereids queries 
unchanged.
   - *Impact:* only the crashing case changes; every other path is provably 
unchanged (the boolean differs from the old value only when `isNereids && 
isPointQuery && size==1`).
   
   **3. Features added** — N/A.
   **4. Code refactored** — N/A (only a one-line logic change + hoisting a 
loop-invariant local).
   **5. Functions optimized** — N/A.
   
   I could not build/run FE locally; verification relies on CI. The new 
regression test (`test_point_query_list_partition`) reproduces the original 
failure and adds a prepared-statement case to guard the no-regression path.


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