Skip to content

feat(sql): lower typed List element access - #398

Merged
zzylol merged 5 commits into
mainfrom
feat/sql-element-access
Sep 11, 2026
Merged

zzylol merged 5 commits into
mainfrom
feat/sql-element-access

Conversation

@zzylol

@zzylol zzylol commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

ClickHouse arrayElement and bracket access were always bound as Map lookup, so a declared List column could not reach a typed query plan. This extends the existing planning adapter to the shared Map/List element resolver and exports asap_element_access without changing the structural SQL parser path.

Before, SELECT samples[1] FROM t failed for a List column. After, it retains the declared element type and nullability; negative and nullable dynamic indices also type correctly. Literal zero, noninteger List indices, and unsupported containers fail closed. Existing Map queries remain supported through the same canonical resolver. DataFusion's adapter still explicitly refuses physical execution.

Verification: all asap-frontend-sql tests passed, including 92 lowering tests, the five original o11y Map queries, canonical exported function assertions, and invalid-index regressions. This is parser/planner support, not a latency claim or lambda/counter-query implementation. Deployment must pin the backend generic element consumer (#653) together with this Planner change; old backends must not assume the new function is executable. Stacked on #397.

@zzylol
zzylol changed the base branch from feat/typed-element-access to main September 11, 2026 15:23
@zzylol
zzylol marked this pull request as ready for review September 11, 2026 15:23
@zzylol
zzylol merged commit 4b0bef3 into main Sep 11, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant