doris: support LATERAL VIEW; starrocks: pin its engine-rejection - #406
Merged
Conversation
…-10085 fallout) Bumping bytebase to the strict parser surfaced LATERAL VIEW as a previously-swallowed construct: the old parser truncated SELECT * FROM person LATERAL VIEW EXPLODE(...) tmp AS c at LATERAL and "accepted" the prefix, losing the clause from lineage. Container-verified against Doris 3.1.4 and StarRocks 3.4.10: - doris: parse LATERAL VIEW generator(args) tableAlias AS col[, col...] as a chainable TableRef suffix (new ast.LateralView, walked; the span walker analyzes the generator's expressions, so a subquery inside one contributes its table read and the lateral alias is not reported as a physical table). The engine requires the table alias and the AS list and has no OUTER variant — those forms stay rejected, as does trailing junk after the clause. - starrocks: the engine has no Hive-style LATERAL VIEW at all (its lateral form is `, [LATERAL] unnest(...)`, already supported), so the parser is unchanged and the rejection is pinned in the conformance matrix. Both matrices replayed green (doris +9 cases, starrocks +2). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bumping bytebase to the strict parser (#402/#403) surfaced
LATERAL VIEWas a previously-swallowed construct: the old parser truncatedSELECT * FROM person LATERAL VIEW EXPLODE(ARRAY(30, 60)) tableName AS c_ageatLATERALand "accepted" the prefix — the clause never reached the AST or lineage.Container-verified against Doris 3.1.4 and StarRocks 3.4.10:
LATERAL VIEW generator(args) tableAlias AS col[, col...]as a chainableTableRefsuffix (newast.LateralView, wired into Walk; the span walker analyzes the generator's expressions, so a subquery inside one contributes its table read and the lateral alias is not reported as a physical table). Engine-verified boundaries: the table alias andASlist are required, theOUTERvariant is rejected, and trailing junk after the clause stays rejected., [LATERAL] unnest(...), already supported), so the parser is unchanged and the rejection is pinned in the conformance matrix. The bytebase-side StarRocks smoke test asserting the old swallow-based "accept" will be flipped in the bytebase bump PR.Verification
-shortsuites green; both container conformance matrices replayed green (doris +9 cases, starrocks +2).EXPLODE((SELECT arr FROM t3 ...))→t3in AccessTables).🤖 Generated with Claude Code