github-actions[bot] commented on code in PR #69998:
URL: https://github.com/apache/doris/pull/69998#discussion_r4444595867
##########
be/src/service/point_query_executor.cpp:
##########
@@ -135,6 +137,45 @@ Status Reusable::init(const TDescriptorTable& t_desc_tbl,
const std::vector<TExp
_runtime_state->set_query_options(query_options);
RETURN_IF_ERROR(DescriptorTbl::create(_runtime_state->obj_pool(),
t_desc_tbl, &_desc_tbl));
_runtime_state->set_desc_tbl(_desc_tbl);
+ for (const auto* slot : tuple_desc()->slots()) {
Review Comment:
[P1] Translate legacy unset UIDs before decoding row-store values
This branch accepts a legacy descriptor with `col_unique_id == -1` by
resolving the slot name, but `_col_uid_to_idx` and `_missing_col_uids` are
still built from the original `-1` below. Row-store JSONB keys are written with
the tablet column's positive `unique_id`, and `jsonb_to_columns()` only matches
those numeric keys, so a full-type legacy request misses the stored value and
inserts the FE default/NULL; the partial-row-store path likewise treats `-1` as
an absent column. Translate the name-resolved column UID into all
decoder/include maps while retaining the slot index, or reject `-1` before
accepting the path; add a legacy descriptor regression.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ExecuteCommand.java:
##########
@@ -145,6 +145,7 @@ public void run(ConnectContext ctx, StmtExecutor executor)
throws Exception {
// Reuse the cached short-circuit plan only when table metadata is
unchanged and the statement
// has no nondeterministic functions. Otherwise fall back to the
normal execution path below.
if (statementContext.isShortCircuitQuery()
+ && ctx.getSessionVariable().isEnableShortCircuitQuery()
&& hasShortCircuitContext
&& shortCircuitContextReusable
Review Comment:
[P1] Invalidate cached point-query plans when the local table is replaced
The fast-path reuse check validates only schema/topology counters on the
cached `OlapTable` itself. After `DROP TABLE t` and `CREATE TABLE t`, the old
object remains reachable through the prepared context with matching counters,
while the new table has a different ID; this branch then sends the old
descriptor/tablet lookup without resolving or replanning the current relation.
The result can be stale dropped-table rows or an unavailable-table error.
Require the cached table identity/generation to match the current catalog
relation (or invalidate on drop) and add a prepared drop/recreate regression.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ExecuteCommand.java:
##########
@@ -145,6 +145,7 @@ public void run(ConnectContext ctx, StmtExecutor executor)
throws Exception {
// Reuse the cached short-circuit plan only when table metadata is
unchanged and the statement
// has no nondeterministic functions. Otherwise fall back to the
normal execution path below.
if (statementContext.isShortCircuitQuery()
+ && ctx.getSessionVariable().isEnableShortCircuitQuery()
Review Comment:
[P1] Refresh execution options before reusing a prepared point-query plan
`isReusable(ctx)` only checks the cached table versions/topology and
file-cache limit, but the installed `ShortCircuitQueryContext` still carries
the `TQueryOptions` serialized when the first execution was planned. Toggling
`return_object_data_as_binary` between two otherwise reusable EXECUTEs
therefore keeps the old NULL/binary object mode in `VMysqlResultWriter`;
toggling `enable_short_circuit_query_access_column_store` likewise keeps the
old permission when a requested column is absent from row store. Fingerprint
all execution options consumed by this request (at least these two), or rebuild
the serialized options for the current EXECUTE, and add toggle regressions.
--
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]