Skip to content

Conversation

@finchxxia
Copy link

@finchxxia finchxxia commented Jan 4, 2026

To solve issue #2150

  1. I found that datafusion-sqlparser-rs cannot support multi-table insert currently.
-- Unconditional multi-table insert
INSERT [ OVERWRITE ] ALL
  intoClause [ ... ]
<subquery>

-- Conditional multi-table insert
INSERT [ OVERWRITE ] { FIRST | ALL }
  { WHEN <condition> THEN intoClause [ ... ] }
  [ ... ]
  [ ELSE intoClause ]
<subquery>
  1. Another case is when I using SAMPLE in subquery, it cannot work normally.
SELECT * FROM (SELECT * FROM (select report_from from my_table) SAMPLE (10000 ROWS)) AS anon_1

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @finchxxia!

  • it doesn't seem like we have tests (unless I missed them) for the multitable insert diffs? If not can we add tests that demonstrate the changes in behavior
  • Can we split this PR into two, one for the multitable insert and the other for the sample clause? I think that would make the PR easier to get to, given that they're unrelated changes

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.

2 participants