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

[Subtask] support add table property and remove table property for spark-connector #2448

Closed
FANNG1 opened this issue Mar 7, 2024 · 5 comments · Fixed by #2456
Closed

[Subtask] support add table property and remove table property for spark-connector #2448

FANNG1 opened this issue Mar 7, 2024 · 5 comments · Fixed by #2456
Assignees
Labels
good first issue Good for newcomers subtask Subtasks of umbrella issue

Comments

@FANNG1
Copy link
Contributor

FANNG1 commented Mar 7, 2024

Describe the subtask

Describe the subtask

please add related code to com.datastrato.gravitino.spark.catalogGravitinoCatalog.java, transfrom Spark TableChange to Gravitino TableChange, you could refer to renameTable implement

  public Table alterTable(Identifier ident, TableChange... changes) throws NoSuchTableException {
    throw new NotSupportedException("Doesn't support altering table for now");
  }

Related Spark SQL should add to SparkIT.java, please refer https://spark.apache.org/docs/latest/sql-ref-syntax-ddl-alter-table.html

Parent issue

#1227

@FANNG1 FANNG1 added the subtask Subtasks of umbrella issue label Mar 7, 2024
@FANNG1 FANNG1 changed the title [Subtask] support Add property and remove property for spark-connector [Subtask] support add table property and remove table property for spark-connector Mar 7, 2024
@FANNG1 FANNG1 added the good first issue Good for newcomers label Mar 7, 2024
@caican00
Copy link
Collaborator

caican00 commented Mar 7, 2024

Hi @FANNG1 could you assign it to me?

@caican00
Copy link
Collaborator

caican00 commented Mar 7, 2024

Hi @FANNG1 Should I support all tablechange in one pr?

@FANNG1
Copy link
Contributor Author

FANNG1 commented Mar 7, 2024

Hi @FANNG1 Should I support all tablechange in one pr?

One or two PR are ok for me, It's depends on you, please note that some TableChange issues are assigned to other developers.

@caican00
Copy link
Collaborator

caican00 commented Mar 7, 2024

Hi @FANNG1 Should I support all tablechange in one pr?

One or two PR are ok for me, It's depends on you, please note that some TableChange issues are assigned to other developers.

got it.

@FANNG1
Copy link
Contributor Author

FANNG1 commented Mar 7, 2024

There is an initial implement about UpdateColumnPostion #2454, you could reference to it if not familiar with spark-connector :)

caican00 added a commit to caican00/gravitino that referenced this issue Mar 7, 2024
@jerryshao jerryshao added this to the Gravitino 0.5.0 milestone Mar 7, 2024
FANNG1 pushed a commit that referenced this issue Mar 7, 2024
…moveProperty for spark-connector (#2456)

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

support add table property and remove table property for spark-connector
in AlterTableCommand.

### Why are the changes needed?
Implement setProperty and RemoveProperty ops for Spark
AlterTableCommand.

Fix: [#2448](#2448)

### Does this PR introduce _any_ user-facing change?
Yes, users can run the following commands to modify the table properties
using spark sql.

```
-- Alter TABLE property Using SET PROPERTIES
ALTER TABLE gravitino_catalog.dbx.tab1 SET TBLPROPERTIES ('key1' = 'value1');

-- DROP TABLE PROPERTIES
ALTER TABLE gravitino_catalog.dbx.tab1 UNSET TBLPROPERTIES ('key1');
```

### How was this patch tested?

new uts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers subtask Subtasks of umbrella issue
Projects
None yet
3 participants