Skip to content

Preserve and validate native ARRAY INSERT VALUES - #153

Open
osipovartem wants to merge 8 commits into
df55-array-insert-variantfrom
df55-array-insert-coercion
Open

osipovartem wants to merge 8 commits into
df55-array-insert-variantfrom
df55-array-insert-coercion

Conversation

@osipovartem

Copy link
Copy Markdown
Collaborator

Summary

  • Plan native ARRAY INSERT VALUES using the target column type without coercing unrelated VALUES columns. Preserve batch conversion for homogeneous rows and use per-row conversion only when mixed origins require it.
  • Reject unsupported scalar subqueries in ARRAY VALUES at planning time instead of producing a plan that fails during execution.
  • Validate legacy Utf8-backed ARRAY roots when the destination is native ARRAY; leave ordinary VARIANT targets and native List inputs on their existing conversion paths.

Verification

  • cargo +1.97.0 test -p datafusion-sql --test sql_integration: 621/621 passed.
  • Rustice at this commit: 38 focused ARRAY/VARIANT tests passed, legacy text-root execution test passed, and CSV/JSON COPY tests passed.
  • Independent read-only review: approved with no blocking correctness, performance, or API findings.

Performance

The new strict conversion applies only to textual sources targeting native ARRAY. Homogeneous ARRAY VALUES are converted as a batch in the outer INSERT projection. A focused 1M-row conversion microbenchmark measured ~2.76M rows/s; end-to-end interactive latency has not been remeasured here.

@github-actions github-actions Bot added the sql label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant