Skip to content

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

Add back the resolved logical plan for UPDATE TABLE. It was in #25626 before but was removed later.

Why are the changes needed?

In #25626 , we decided to not add the update API in DS v2, but we still want to implement UPDATE for builtin source like JDBC. We should at least add the resolved logical plan.

Does this PR introduce any user-facing change?

no, UPDATE is still not supported yet.

How was this patch tested?

new tests.

@cloud-fan
Copy link
Contributor Author

cc @xianyinxin

@cloud-fan cloud-fan changed the title [SPARK-28892][SQL] add resolved logical plan for UPDATE TABLE [SPARK-28892][SQL][followup] add resolved logical plan for UPDATE TABLE Oct 4, 2019
@SparkQA
Copy link

SparkQA commented Oct 4, 2019

Test build #111781 has finished for PR 26025 at commit 32e63b9.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class DeleteFromTable(
  • case class UpdateTable(

@dongjoon-hyun
Copy link
Member

The UT failure looks relevant.

* See the License for the specific language governing permissions and
* limitations under the License.
*/

Copy link

Choose a reason for hiding this comment

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

So are we extracting some of DDL relative plans in this commands.scala? But there're still other commands in basicLogicalOperators.scala. What's the relation of the two?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd like to put all the DDL/DML commands in this file, starting with DELETE/UPDATE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, let me do it together in an individual PR.

LocalRelation(a))
assertAnalysisError(plan, "Predicate sub-queries can only be used" +
" in Filter/DeleteFromTable" :: Nil)
" in Filter" :: Nil)
Copy link

Choose a reason for hiding this comment

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

Why there isn't the new SupportsSubquery?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SupportsSubquery is an internal class and end-users don't know what it is. So I just put "a few commands", see https://github.com/apache/spark/pull/26025/files#diff-1d14ac233eac6f233c027dba0bdf871dR608

Copy link

Choose a reason for hiding this comment

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

Ok, got it.

@xy-xin
Copy link

xy-xin commented Oct 5, 2019

General LGTM.

@SparkQA
Copy link

SparkQA commented Oct 5, 2019

Test build #111803 has finished for PR 26025 at commit 18ddaaa.

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

@SparkQA
Copy link

SparkQA commented Oct 7, 2019

Test build #111834 has finished for PR 26025 at commit ab3447f.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Oct 7, 2019

Test build #111840 has finished for PR 26025 at commit ab3447f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@gatorsmile gatorsmile left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks! Merged to master.

@gatorsmile
Copy link
Member

cc @brkyvz

@gatorsmile gatorsmile closed this in 948a6e8 Oct 8, 2019
atronchi pushed a commit to atronchi/spark that referenced this pull request Oct 23, 2019
### What changes were proposed in this pull request?

Add back the resolved logical plan for UPDATE TABLE. It was in apache#25626 before but was removed later.

### Why are the changes needed?

In apache#25626 , we decided to not add the update API in DS v2, but we still want to implement UPDATE for builtin source like JDBC. We should at least add the resolved logical plan.

### Does this PR introduce any user-facing change?

no, UPDATE is still not supported yet.

### How was this patch tested?

new tests.

Closes apache#26025 from cloud-fan/update.

Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Xiao Li <gatorsmile@gmail.com>
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.

5 participants