mrhhsg opened a new pull request, #70191:
URL: https://github.com/apache/doris/pull/70191
### What problem does this PR solve?
Issue Number: None
Related: #65051, #69903. This supersedes #69998 with the simplified BE
policy.
Nested-column pruning can narrow complex slot descriptors, while
short-circuit point queries materialize full row-store JSONB values. Decoding
those values with a narrowed descriptor can read the wrong layout. Keeping the
current full descriptor alone also does not establish compatibility with
historical complex-column payloads after schema changes.
### Changes
- Decide short-circuit eligibility before nested pruning: allow only simple
scalar slots/literals (including aliases). Complex projections, nested-field
access and metadata-producing expressions use normal planning; an unreferenced
complex column does not disable a scalar point query.
- Retain normal nested-column pruning rather than forcing complex queries
through full row-store decoding.
- Validate only the actual row-store input descriptor (tuple 0), not
auxiliary index tuples.
- Preserve the effective pruning setting across `SET_VAR` rollback,
revalidate prepared reuse, replan routing-related hints, and clear inherited
short-circuit state before fallback planning. Retain the upstream stale
prepared-plan refresh/reparse behavior.
- Simplify BE to reject every nonempty `all_access_paths` or
`predicate_access_paths` list. Do not interpret legacy/typed path dialects,
infer schema compatibility, or remap UIDs.
- Cover strict rejection, no-path payload/default decoding, conservative FE
routing, prepared execution, and schema-evolution queries.
### Behavior and compatibility boundaries
- This deliberately trades some short-circuit optimization for safety.
Complex and nontrivial projections can use normal execution even when nested
pruning is disabled. Simple scalar point queries retain their fast path.
- Old FE requests carrying access paths are rejected, including otherwise
compatible whole-column DATA roots and scalar metadata requests. The BE error
does **not** automatically retry with normal FE planning.
- Requests without access paths retain the existing decoder/default
behavior. This is not a general fix for complex-schema evolution from old FE
requests or producer-schema-aware row caching.
- No Thrift/protobuf or stored row-format changes.
### Validation
- Focused FE tests: **28/28 passed** (`ShortCircuitPointQueryTest`,
`ShortCircuitQueryContextTest`, `ExecuteCommandTest`).
- Fresh ASAN BE unit-test binary built successfully; focused tests: **12/12
passed** (`PointQueryReusableTest.*`, `LookupConnectionCacheTest.*`,
`RowCacheTest.*`). The no-path test decodes actual JSONB and checks both
payload-present and default-value cases.
- Focused clang-format 16 verification and `git diff --check` passed.
- The SQL suite and expected output are unchanged by the final BE
simplification. SQL regression, complete FE/BE server binary builds, live
mixed-version deployment and performance benchmarks were **not rerun on the
final source snapshot**; no full-CI success is claimed.
```bash
./run-fe-ut.sh --run
'org.apache.doris.nereids.rules.rewrite.ShortCircuitPointQueryTest,org.apache.doris.qe.ShortCircuitQueryContextTest,org.apache.doris.nereids.trees.plans.commands.ExecuteCommandTest'
./run-be-ut.sh -j 24 --run \
--filter='PointQueryReusableTest.*:LookupConnectionCacheTest.*:RowCacheTest.*'
clang-format --dry-run --Werror \
be/src/service/point_query_executor.cpp \
be/test/service/point_query_exector_test.cpp
git diff --check
```
--
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]