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

[#2543] feat(spark-connector): support row-level operations to iceberg Table #3366

Conversation

jerryshao
Copy link
Collaborator

What changes were proposed in this pull request?

  • refactor table implementation, make SparkIcebergTable extend Iceberg SparkTable, and SparkHiveTable extend Kyuubi HiveTable.

  • support row-level operations to iceberg Table

1. update tableName set c1=v1, c2=v2, ...

2. merge into targetTable t
   using sourceTable s
   on s.key=t.key
   when matched then ...
   when not matched then ...

3. delete from table where xxx

Why are the changes needed?

  1. For spark-connector in Iceberg, it explicitly uses SparkTable to identify whether it is an Iceberg table, so the SparkIcebergTable must extend SparkTable.

  2. support row-level operations to iceberg Table.

Fix: #2543

Does this PR introduce any user-facing change?

Yes, support update ... , merge into ..., delete from ...

How was this patch tested?

New ITs.

…g Table (#3243)

### What changes were proposed in this pull request?

- refactor table implementation, make `SparkIcebergTable` extend Iceberg
`SparkTable`, and `SparkHiveTable` extend Kyuubi `HiveTable`.

- support row-level operations to iceberg Table

```
1. update tableName set c1=v1, c2=v2, ...

2. merge into targetTable t
   using sourceTable s
   on s.key=t.key
   when matched then ...
   when not matched then ...

3. delete from table where xxx
```

### Why are the changes needed?

1. For spark-connector in Iceberg, it explicitly uses `SparkTable` to
identify whether it is an Iceberg table, so the `SparkIcebergTable` must
extend `SparkTable`.

2. support row-level operations to iceberg Table.

Fix: #2543

### Does this PR introduce any user-facing change?
Yes, support update ... , merge into ..., delete from ...

### How was this patch tested?
New ITs.
@FANNG1
Copy link
Contributor

FANNG1 commented May 13, 2024

@caican00 could analyse the erorr and fix it?

@FANNG1
Copy link
Contributor

FANNG1 commented May 13, 2024

this PR depends on #3358

@FANNG1
Copy link
Contributor

FANNG1 commented May 13, 2024

@caican00 could you fix the conflict?

@jerryshao
Copy link
Collaborator Author

Why there is a conflict in this part? AFAIK this part should be quite close in branch-0.5 and main.

@FANNG1
Copy link
Contributor

FANNG1 commented May 13, 2024

spark-connector/spark-connector/src/main/java/com/datastrato/gravitino/spark/connector/hive/GravitinoHiveCatalog.java

Maybe a github bug, I could patch the PR to branch-0.5 manually without modification.

@jerryshao
Copy link
Collaborator Author

Anyway, @caican00 would you please cherry-pick this commit to branch-0.5 and create a new PR? I'm going to close this PR.

@caican00
Copy link
Contributor

caican00 commented May 14, 2024

Anyway, @caican00 would you please cherry-pick this commit to branch-0.5 and create a new PR? I'm going to close this PR.

Sorry for the late reply. i have created a new pr for this commit to branch-0.5 cc @jerryshao @FANNG1

@jerryshao jerryshao closed this May 14, 2024
@jerryshao jerryshao deleted the cherry-pick-branch-0.5-f207466f143dc21cb4fd015e7b98c1ab26782025 branch May 16, 2024 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants