TASK-37: dispatch struct(...) and make_array(...) on the native engine - #20
Closed
claude-agent-ahrzb[bot] wants to merge 1 commit into
Closed
TASK-37: dispatch struct(...) and make_array(...) on the native engine#20claude-agent-ahrzb[bot] wants to merge 1 commit into
claude-agent-ahrzb[bot] wants to merge 1 commit into
Conversation
… TASK-37 native accepted these at fit (DataFusion) but infer() failed: struct(...) raised 'Unsupported expression' and make_array(...) 'Unknown function', on valid SQL the library accepted at fit time. Two distinct gaps, not one: - struct(a, b) / struct(a AS x, ...) parse into a first-class SqlExpr::Struct node (NOT a Function), so a new convert_expr arm handles it: positional -> c0/c1/..., named (Expr::Named) -> the alias, mirroring codegen's _convert_struct and DataFusion. The typed STRUCT<...>(...) form is rejected explicitly. - The struct branch in convert_function was dead (sqlparser never routes struct(...) there) and is removed. - make_array(...) IS a function; it now routes to Expr::List, the same path the bracket literal [a, b] already uses. The three xfail_on_native markers are removed; all three pass on both engines. array(...) (a DataFusion alias that also fails on native) is deliberately left out -- not the pinned case, and adding it would be untested surface. Flagged for a possible follow-up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
claude-agent-ahrzb Bot
pushed a commit
that referenced
this pull request
Jul 24, 2026
…K-38 scoped to full fix (option a) per AmirHossein
Author
|
Closing as obsolete: the SQLTransform line this targets has been reset (#54). The DataFusion native engine, the codegen backend, and the batch transform() path are removed; what remains is the confit-served fit-and-serve path. Nothing here is lost — the branch and its commits stay reachable if this work is ever revived. |
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.
Native accepted these container-construction forms at fit (DataFusion) but
infer()failed on them — valid SQL the library accepted at fit time, breaking only in production.Two distinct gaps (the ticket framing was refined after recon)
The original ticket said "native has no
struct(...)dispatch in convert_function." Measurement showed that's imprecise —convert_functionhad astructcase, but it was dead: sqlparser parsesstruct(...)into a first-classSqlExpr::Structnode that never reachesconvert_function. Iris rewrote the ACs to match.AC#1 —
SqlExpr::Structarm inconvert_exprPositional →
c0/c1; named (a AS x, parsed asExpr::Named) → the alias. Mirrors codegen's_convert_struct(plan.py:390) and DataFusion.AC#2 — removed the dead
structbranch inconvert_functionConfirmed unreachable (sqlparser routes
struct(...)toSqlExpr::Struct); deleted.AC#3 —
make_array→Expr::Listinconvert_functionPer-engine dispatch by design: native keys off the function name (sqlparser
Function), codegen off the AST node (sqlglotexp.Array) — different parsers. The differential harness proves they agree, not that the code shape is shared.AC#4 — the 3
xfail_on_nativemarkers removed, all pass on both engines.Scope note —
array(...)left out deliberatelyarray(a, b)also fails on native (Unknown function: array) — a DataFusion alias, the same loud-gap class. It is not the pinned/tested case, and adding it means untested surface, so per the AC guidance it's excluded and flagged as a possible follow-up rather than folded in silently.Verification
xfail(failing) on master and pass now — the pre-fix state is the mutation.src/expr_build.rs+tests/test_diff_types.py. Rust change →maturin develop.🤖 Generated with Claude Code