Skip to content

Conversation

@rdblue
Copy link
Contributor

@rdblue rdblue commented Feb 2, 2018

What changes were proposed in this pull request?

DataSourceV2 does not currently apply any validation rules when writing. Other write paths attempt to validate that a data frame can be written to a target table or path and these changes add the same logic to v2.

This updates the logical plan to use InsertIntoTable and applies the insert preprocess rules to writes. It also adds a conversion rule from InserIntoTable to DataSourceV2Write because InsertIntoTable cannot be used in logical plans after analysis.

InsertIntoTable is not necessarily the right logical plan. It assumes that the table exists and can report its schema. I would like to hear suggestions for what the correct logical plan is. Other paths appear to use a source-specific command.

This also relies on changes in #20387, which hasn't been merged yet.

How was this patch tested?

Added a test that fails analysis in the preprocess rule.

@SparkQA
Copy link

SparkQA commented Feb 3, 2018

Test build #87006 has finished for PR 20488 at commit 3580daf.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class NoopCommand() extends RunnableCommand

@rdblue
Copy link
Contributor Author

rdblue commented May 11, 2018

Closing this in favor of #21305.

@rdblue rdblue closed this May 11, 2018
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