Repository navigation
Revert "Fix NUMBER_OF_COLUMNS_DOESNT_MATCH for Distributed table with duplicate ALIAS expressions" - #107846
Conversation
… duplicate ALIAS expressions"
|
Workflow [PR], commit [cbbd606] Summary: ✅
AI ReviewSummaryThis PR mechanically reverts #106404: it removes the Missing context / blind spots
Findings💡 Nits
Final VerdictStatus: ✅ Approve |
| { | ||
| if (WhichDataType(arg).isString()) | ||
| continue; | ||
| throw Exception(ErrorCodes::BAD_ARGUMENTS, "Function __actionName is internal nad should not be used directly"); |
There was a problem hiding this comment.
This reintroduces the nad typo in a user-visible diagnostic. Could you keep the spelling fix from the reverted PR and use and here and in the matching PlannerActionsVisitor.cpp error text? That preserves the revert's behavior while avoiding a degraded error message.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 22/22 (100.00%) | Lost baseline coverage: none · Uncovered code |
…ning The disambiguation half of this pull request wrapped duplicate projection items in `__actionName(expr, '<unique>')`. It relied on the relaxation of `FunctionActionName` that #106404 made, which #107846 reverted the day after this branch was cut, so on current master that wrapper rejects every argument that is not a `String` constant: SELECT __actionName(materialize(1) + 1, 'dedup_1'); -- Code: 36. BAD_ARGUMENTS: Function __actionName is internal nad should not be used directly SELECT __actionName(toString(materialize(1)), 'dedup_1'); -- Code: 44. ILLEGAL_COLUMN: Argument at index 0 for function __actionName must be constant The duplicate-column reconciliation that superseded it now lives on the initiator, in `buildShardCollapseFanOut` (#107913). What remains here is the half that does not depend on any of that: the parallel-replicas entry points now inline `ALIAS` columns before `buildQueryTreeForShard`, exactly as the Distributed/`remote` path already does. `ReplaseAliasColumnsVisitor` moves out of `StorageDistributed.cpp` into `buildQueryTreeForShard.cpp` so all four callers share it, which also removes the byte-identical copy `InlineAliasColumnsForNamingVisitor` that landed on master in the meantime. Related: #112246 Co-authored-by: Yakov Olkhovskiy <[email protected]>
Reverts #106404
Version info
26.6.1.993