Hi Bryan, I'm keeping my eyes on it.
Best regards, -------------------- Yuan Tian On Fri, Jul 3, 2026 at 10:47 AM Bryan Yang <[email protected]> wrote: > *Hi Yuan Tian,* > > I have finished the latest updates for PR #17960. > > This update covers two areas: > > 1. LCA alias canonical matching > > SELECT alias reuse now derives the alias key from > Identifier.getCanonicalValue() and folds it to uppercase. This makes > ordinary and delimited aliases match consistently for lateral alias reuse, > so x, X, "x", and "X" all refer to the same SELECT alias name. > > I also added regression coverage for exact delimited matches, > case-differing delimited matches, delimited/unquoted mixed references, and > duplicate canonical alias ambiguity. > > 2. LCA plan-expression / EXPLAIN JSON blowup > > The LCA rewrite no longer deep-copies or inlines the already-expanded > expression from a previous alias. Instead, the planner reuses previous LCA > projections through symbol mappings and appends SELECT projections in > batches, so deep chained aliases should no longer cause the O(N²) > plan-expression / EXPLAIN JSON blowup. > > I also added regression coverage for: > > - reusing a previous CAST(...) AS x projection without duplicating the > Cast expression > - a 200-column chained LCA case that keeps plan expressions shallow and > the plan JSON bounded > > Verified locally with: > > ./mvnw -nsu test -pl iotdb-core/datanode > > -Dtest=SelectAliasReuseTest,CreateTableStatementTest,TableConfigTaskVisitorTest > > All 42 targeted tests passed. > > Please take another look when you have time. Thanks again for the detailed > review and measurements. > > *Best,* > > *Bryan Ynag* >
