Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support partial insert in merge into command #8199

Open
jhchee opened this issue Aug 1, 2023 · 2 comments
Open

Support partial insert in merge into command #8199

jhchee opened this issue Aug 1, 2023 · 2 comments

Comments

@jhchee
Copy link

jhchee commented Aug 1, 2023

Feature Request / Improvement

Currently, if the insert statement specifies less columns than the target table size, the following exception will be thrown:

Exception in thread "main" org.apache.spark.sql.AnalysisException: Cannot find column 'col_1' of the target table among the INSERT columns: col_2, col_3. INSERT clauses must provide values for all columns of the target table.

For a wide table that has 1000 columns, the user is required to specify all the columns with default values null to avoid this exception. Can we support partial insert in merge into (default to null if not specified) command so the developer can maintain clean SQL statement.

E.g. Delta merge command has already supported this
image

https://docs.databricks.com/sql/language-manual/delta-merge-into.html

Query engine

Spark

Copy link

This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

@github-actions github-actions bot added the stale label Sep 10, 2024
@manuzhang
Copy link
Collaborator

WIP in #9502

@github-actions github-actions bot removed the stale label Sep 13, 2024
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

No branches or pull requests

2 participants